Changing the Memory Model (32-bit JVM)
Three memory models are available on the 32-bit JVM.
Further details of the AIX® Memory Models can be found in the documentation for your release of AIX. For example: Large program support.
The small memory model
With the default
small memory model for an application, the application has only one
segment, segment 2, in which it can malloc() data
and allocate additional thread stacks. It does, however, have 11 segments
of shared memory into which it can mmap() or shmat() data.
The large memory model
This single segment
for data that is allocated by using malloc() might
not be enough, so it is possible to move the boundary between Private
and Shared memory, providing more Private memory to the application,
but reducing the amount of Shared memory. You move the boundary by
altering the o_maxdata setting in the Executable Common Object
File Format (XCOFF) header for an application.
- Setting the value of o_maxdata at compile time by using the -bmaxdata flag with the ld command.
- Setting the o_maxdata value by using the LDR_CNTRL=MAXDATA=0xn0000000 (n segments) environment variable.
The very large memory model
- The dynamic movement of the private and shared memory boundary between a single segment and the segment specified by the MAXDATA setting. This dynamic movement is achieved by allocating private memory upwards from segment 3 and shared memory downwards from segment C. The private memory area can expand upwards into a new segment if the segment is not being used by the shmat or mmap routines.
- The ability to load shared libraries into the process private area. If you specify a MAXDATA value of 0 or greater than 0xAFFFFFFF, the process will not use global shared libraries, but load them privately. Therefore, the shmat and mmap procedures begin allocating at higher segments because they are no longer reserved for shared libraries. In this way, the process has more contiguous memory.