When compiling with OPTIMIZE, the MAXMEM option limits the amount of memory used for local tables of specific, memory intensive optimizations to the specified number of kilobytes. The minimum number of kilobytes that may be specified is 1. The maximum number of kilobytes that may be specified is 2097152, and the default is 1048576.
If you specify the maximum value of 2097152, the compiler will assume that unlimited memory is available. If you specify any smaller value for MAXMEM, the compiler, especially when the OPT(2) option is in effect, may issue a message saying that optimization is inhibited and that you should try using a larger value for MAXMEM.
Use the MAXMEM option if you know that less (or more) memory is available than implied by the default value.
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.
>>-MAXMEM--(size)----------------------------------------------><
ABBREVIATIONS: MAXM
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 advantage of using the MAXMEM option is that, for large and complex applications, the compiler produces a slightly less-optimized object module and generates a warning message, instead of terminating the compilation with an error message of "insufficient virtual storage".