Managing private storage allocation

When the system creates an address space, it assigns a certain area of the address space for use as private storage. High private storage is allocated from the top of the private area down, and low private storage is allocated from the bottom of the private area up. Private storage allocation is governed by two rules:
  1. Low private storage cannot exceed the boundary set by the installation-determined user region size limit.
  2. High private can "grow" down as long as it does not go below the low storage boundary, determined by the allocated low private storage area at the highest address. That is, high private storage must be allocated above all allocated low private storage, and low private storage must be allocated below all allocated high private storage.

High private storage can be allocated below the user region boundary as long as the high private storage resides above all allocated low private storage.

As a result of rule 2, several problems could occur. First, a caller might be unable to obtain low private storage even though low private storage is available because an area of high private storage is in the way and the available storage is above it. Figure 1 illustrates the problem.

To reduce the possibility of being unable to obtain low private storage, try to obtain storage areas for long-term use first so that they will be allocated at the top (high private storage) or bottom (low private storage) of the private area, preventing long-term allocations from fragmenting private storage. You should also release any storage when it is no longer needed.

Another problem could occur due to the allocation of large amounts of high private storage. The amount of low private storage could be reduced to the point that the system cannot provide a user region of the specified size when it attempts to a start a new step. If this situation occurs, the step is ended abnormally.

To minimize this problem, try to avoid fragmenting high private storage because this causes successive allocations to reach farther and farther down into the low private area. You should also release any storage when it is no longer needed.
Figure 1. Low and High Private Storage Allocation
ieaa8pt1