-qmaxmem
Category
Purpose
Limits the amount of memory that the compiler allocates while performing specific, memory-intensive optimizations to the specified number of kilobytes.
Defaults
- -qmaxmem=8192 when -O2 is in effect.
- -qmaxmem=-1 when the -O3 or higher optimization level is in effect.
Parameters
- size_limit
- The number of kilobytes worth of memory to be used by optimizations.
The limit is the amount of memory for specific optimizations, and
not for the compiler as a whole. Tables required during the entire
compilation process are not affected by or included in this limit.
A value of -1 permits each optimization to take as much memory as it needs without checking for limits.
Usage
A smaller limit does not necessarily mean that the resulting program will be slower, only that the compiler may finish before finding all opportunities to increase performance. Increasing the limit does not necessarily mean that the resulting program will be faster, only that the compiler is better able to find opportunities to increase performance if they exist.
Setting a large limit has no negative effect on the compilation of source files when the compiler needs less memory. However, depending on the source file being compiled, the size of subprograms in the source, the machine configuration, and the workload on the system, setting the limit too high, or to -1, might exceed available system resources.
Predefined macros
None.
Examples
xlc myprogram.c -qmaxmem=16384