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 argument | maxdata argument | amount of memory |
---|---|---|
'\0020\0\0\0' | 0x10000000 | 256 MB |
'\0040\0\0\0' | 0x20000000 | 512 MB |
'\0060\0\0\0' | 0x30000000 | 768 MB |
'\0100\0\0\0' | 0x40000000 | 1024 MB |
'\0120\0\0\0' | 0x50000000 | 1280 MB |
'\0140\0\0\0' | 0x60000000 | 1536 MB |
'\0160\0\0\0' | 0x70000000 | 1792 MB |
'\0200\0\0\0' | 0x80000000 | 2048 MB |
Historical Number
cplex/FAQ/53
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21399971