IBM Support

32-bit AIX application memory usage

Question & Answer


Question

My 32-bit AIX application runs out of memory once the process size reaches 256 megabytes. However, my computer has 2 gigabytes of memory available, and I have verified that my account can access all of it. Why does the application run out of memory?

Answer

The AIX linker creates 32-bit executables with a default 256-megabyte limit for addressable memory. Apparently this improves the paging properties for applications that use less memory than this limit. However, it can surprise users who expect their applications to access all available memory on the machine. AIX has linker options and system commands that overcome this limitation. Note that this limit does not exist for 64-bit applications.

For CPLEX users who need more than 256 megabytes of memory, the solution to this limitation depends on the CPLEX usage.

  • Callable Library users should link with the option

    -bmaxdata:value

    where value specifies the maximum amount of memory the resulting executable can use. See the table below for possible values.
  • Users of the Interactive CPLEX Optimizer can patch the associated executable file to use more than 256 megabytes of memory. First, make a copy of the executable; call it cplex.big, for example. Then, enter the following command:

    /usr/bin/echo '\0200\0\0\0' | dd of=cplex.big bs=4 count=1 seek=19 conv=notrunc

    Then, cplex.big can access up to two gigabytes of memory. Refer to the table below for other possible memory limits.

The following table shows how to set the arguments for the echo command, and how they correspond to the -bmaxdata options for linking a callable library application.


echo argumentmaxdata argumentamount of memory
'\0020\0\0\0'0x10000000256 MB
'\0040\0\0\0'0x20000000512 MB
'\0060\0\0\0'0x30000000768 MB
'\0100\0\0\0'0x400000001024 MB
'\0120\0\0\0'0x500000001280 MB
'\0140\0\0\0'0x600000001536 MB
'\0160\0\0\0'0x700000001792 MB
'\0200\0\0\0'0x800000002048 MB

[{"Product":{"code":"SSSA5P","label":"IBM ILOG CPLEX Optimization Studio"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Compiling and Linking","Platform":[{"code":"PF002","label":"AIX"}],"Version":"12.6;12.5;12.4;12.3;12.2","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

cplex/FAQ/53

Document Information

Modified date:
16 June 2018

UID

swg21399971