maxmem Optimization Option (AIX)
| Syntax: |
Default: |
| opt(maxmem, number) |
opt(maxmem, 2048) |
This option limits the amount of memory used for local tables
of specific, memory-intensive optimizations to number
kilobytes. If that memory is insufficient for a particular
optimization, the scope of the optimization is reduced.
The default is opt(maxmem, 2048). This default also
applies when the number specified is 0.
The following points apply to the use of the maxmem
optimization option:
- A number 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, the memory used when
performing optimizations might exceed available system
resources. This is more likely when the number
specified is -1.
- The limit set by opt(maxmem) is the amount of memory for
specific optimizations, and not for VisualAge C++ 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 VisualAge C++ needs less
memory.
- Limiting the scope of optimization does not necessarily
mean that the resulting program will be slower, only that
VisualAge C++ may finish before finding all opportunities to
increase performance. If this occurs, a warning
will be given.
- Increasing the limit does not necessarily mean that the
resulting program will be faster, only that VisualAge C++ is
better able to find opportunities to increase performance
if they exist. If no warning is given with a
specific limit, all opportunities were found.
You can also limit the amount of memory used for optimization
by using #pragma
options [no]maxmem=number. The pragma overrides the
configuration file option.

Incremental C++ Build
Configuration
Files

Set Build Options
Build

Optimize your
Application
Debug Optimized
Code

Optimization Options

Optimization Options