Setting the region size for z/OS® XL C/C++ applications

Prior to running your applications, ensure that you have the required region size to run the compiler and to run your application.

Note: The minimum region size for invoking the compiler is 148 MB. Depending on your program and the degree of optimization you are using (for example, OPT(2) and IPA), you may require significantly more space.

If your installation does not change the IBM-supplied default limits in the IEALIMIT or IEFUSI exit routine modules, different values for the region size have the following results:

Region Size Value Result
0K or 0M Provides the job step with all the storage that is available below and above 16 MB. The resulting size of the region below and above 16 MB is unpredictable.
< 0MREGION < 16M Establishes the size of the private area below 16 MB. If the region size specified is not available below 16 MB, the job step terminates abnormally. The extended region size is the default value of 32 MB.
< 16MREGION32M Provides the job step all the storage available below 16 MB. The resulting size of the region below 16 MB is unpredictable. The extended region size is the default value of 32 MB.
< 32MREGION < 2047M Provides the job step all the storage available below 16 MB. The resulting size of the region below 16 MB is unpredictable. The extended region size is the specified value. If the region size specified is not available above 16 MB, the job step abnormally terminates.

Assuming that you do not use your own IEFUSI exit to override this, a specification of REGION=4M provides 4 MB below 16 MB, and a default of 32 MB above 16 MB for a total of 36 MB of available virtual memory and not just 4 MB.

Specifying REGION=40M provides all available private virtual memory below 16 MB, most likely around 8 MB to 10 MB, and 40 MB above 16 MB for a total of around 48 MB. This means that a JCL change from REGION=4M to REGION=40M does not change the virtual storage available to the compiler from 4 MB to 40 MB, but rather from 36 MB to 48 MB. If the only storage use increase is above 16 MB, then the actual increase is 8 MB.

For information about using the IEFUSI installation exit to set process limits, see z/OS UNIX System Services Planning.