-qmaxmem
Description
Limits the amount of memory used by the optimizer for local tables of specific,
memory-intensive optimizations. The memory size limit is specified in kilobytes.
Syntax

>>- -q--maxmem--=--size----------------------------------------><
Defaults
- With -O2 optimization in effect, maxmem=8192.
- With -O3 or greater optimization in effect, maxmem=-1.
Notes
- A size value of -1 permits each optimization to
take as much memory as it needs without checking for limits. Depending on
the source file being compiled, the size of subprograms in the source, the
machine configuration, and the workload on the system, this might exceed available
system resources.
- The limit set by -qmaxmem 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.
- Setting a large limit has no negative effect on the compilation of source
files when the compiler needs less memory.
- Limiting the scope of optimization 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.
Depending on the source file being compiled, the size of the subprograms
in the source, the machine configuration, and the workload on the system,
setting the limit too high might lead to page-space exhaustion. In particular,
specifying -qmaxmem=-1 allows the compiler to try and
use an infinite amount of storage, which in the worst case can exhaust the
resources of even the most well-equipped machine.
Example
To compile myprogram.C so
that the memory specified for local table is 16384 kilobytes, enter:
xlc++ myprogram.C -qmaxmem=16384
Related information