Multiple page size application support

You can specify page sizes to use for four regions of a 32-bit or 64-bit process's address space.

The page sizes can be configured with an environment variable or with settings in an application's XCOFF binary with the ldedit or ld commands by using the following options:
Region ld or ldedit option LDR_CNTRL environment variable Description
Data -bdatapsize DATAPSIZE Initialized data, bss, heap
Stack -bstackpsize STACKPSIZE Initial thread stack
Text -btextpsize TEXTPSIZE Main executable text
Shared Memory -bshmpsize SHMPSIZE Shared memory allocated by the process
Note: The -bshmpsize flag is supported only for 64-bit processes. In 32-bit process mode, the -bshmpsize flag is ignored and a warning message is printed.

You can specify a different page size to use for each of the four regions of a process's address space. For both interfaces, a page size should be specified in bytes. The specified page size may be qualified with a suffix to indicate the unit of the size. The supported suffixes are:

  • K (kilobyte)
  • M (megabyte)
  • G (gigabyte)

These can be specified in upper or lower case.

Only the 4 KB and 64 KB page sizes are supported for all four memory regions. The 16 MB page size is only supported for the process data. process text, and process shared memory regions. The 16 GB page size is only supported for a process shared memory region.

By selecting a non-default page size, you explicitly disable the use of smaller page sizes than the page size that was selected in the same segment.

If an unsupported page size is specified, the kernel will use the next smallest supported page size. If there is no page size smaller than the specified page size, the kernel will use the 4 KB page size.

Support for specifying the page size to use for a process's shared memory with the SHMPSIZE environment variable is available. On previous versions of AIX, the SHMPSIZE environment variable is ignored. The SHMPSIZE environment variable only applies to system V shared memory regions created by the process when it calls the shmget subroutine, ra_shmget subroutine, and ra_shmgetv subroutine. The SHMPSIZE environment variable does not apply to EXTSHM shared memory regions and POSIX real time shared memory regions. A process's SHMPSIZE environment variable does not apply to shared memory regions because the process is using shared memory regions that was created by other processes.