MAXMEM | NOMAXMEM
Category
Optimization and tuning
Pragma equivalent
#pragma options (maxmem) (C only), #pragma options (nomaxmem) (C only)
Purpose
Limits the amount of memory used for local tables, and that the compiler allocates while performing specific, memory-intensive optimizations, to the specified number of kilobytes.
Syntax
Defaults
MAXMEM(*)
Parameters
- size
- The valid range for size is 0 to 2097152. You can use asterisk as a value for size , MAXMEM(*), to indicate the highest possible value, which is also the default. NOMAXMEM is equivalent to MAXMEM(*). Use the MAXMEM size suboption if you want to specify a memory size of less value than the default.
Usage
If the memory specified by the MAXMEM option is insufficient for a particular optimization, the compilation is completed in such a way that the quality of the optimization is reduced, and a warning message is issued.
When a large size is specified for MAXMEM, compilation may be aborted because of insufficient virtual storage, depending on the source file being compiled, the size of the subprogram in the source, and the virtual storage available for the compilation.
- The limit that is set by MAXMEM is the amount of memory for specific optimizations, and not for the compiler as a whole. Tables that are 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 may be able to find opportunities to increase performance.
The usage status of this option is inserted in the object file to aid you in diagnosing a problem with your program.
IPA effects
If you specify the MAXMEM option for any compilation unit in the IPA compile step, the compiler generates information for the IPA link step. This option also affects the regular object module if you request one by specifying the IPA(OBJECT) option.
The option value you specify on the IPA compile step for each IPA object file appears in the IPA link step Compiler Options Map listing section.
If you specify the MAXMEM option on the IPA link step, the value of the option is used. The IPA link step Prolog and Partition Map listing sections display the value of the option.
If you do not specify the option on the IPA link step, the value that it uses for a partition is the maximum MAXMEM value you specified for the IPA compile step for any compilation unit that provided code for that partition. The IPA link step Prolog listing section does not display the value of the MAXMEM option, but the Partition Map listing section does.
Predefined macros
None.