Three memory models are available on the 32-bit JVM.
Further details of the AIX® Memory Models can be found at: http://publib.boulder.ibm.com/infocenter/pseries/v5r3/....
The small memory model
With the default
small memory model for an application (as shown above), 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.
You can alter
the
o_maxdata setting by:
- 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
Activate the
very large memory model by adding "@DSA" onto the end of the
MAXDATA setting.
It provides two additional capabilities:
- 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.
Altering the
MAXDATA setting applies only to a 32-bit
process and not the 64-bit JVM.