ANYHEAP
The ANYHEAP runtime option controls the allocation of unrestricted library heap storage (anywhere heap). Storage that is unrestricted can be located anywhere in 31-bit addressable storage.
The default value for non-CICS applications is ANYHEAP(16K,8K,ANYWHERE,FREE).
The default value for CICS® applications is ANYHEAP(4K,4080,ANYWHERE,FREE).
Syntax >>-ANyheap--(--+-----------+--,--+-----------+--,---------------> '-init_size-' '-incr_size-' .-ANYWHERE-. .-FREE-. >--+----------+--,--+------+--)-------------------------------->< +-ANY------+ '-KEEP-' '-BELOW----'
- init_size
- Determines the initial size of the anywhere heap. This value can be specified as n, nK, or nM bytes of storage. The actual amount of allocated storage is rounded up to the nearest multiple of 8 bytes.
- incr_size
- Determines the minimum size of any subsequent increment to the anywhere heap. This value can be specified as n, nK, or nM bytes of storage. The actual amount of allocated storage is rounded up to the nearest multiple of 8 bytes.
- ANYWHERE|ANY
- Specifies that anywhere heap can be allocated anywhere in 31–bit addressable storage. If there is no storage available above the 16M line, storage is acquired below the 16-MB line.
- BELOW
- Specifies that anywhere heap is allocated below the 16M line.
- FREE
- Specifies that an anywhere heap increment is released when the last of the storage within that increment is freed.
- KEEP
- Specifies that an anywhere heap increment is not released when the last of the storage within that increment is freed.
CICS consideration
- If ANYHEAP(0) is specified, the initial anywhere heap segment is obtained on the first use and will be based on the increment size.
- The maximum initial and increment size for the anywhere heap is 1 gigabyte (1024M).
- The default increment size is 4080 bytes, rather than 4096 bytes, to accommodate the 16 byte CICS storage check zone. Without this accommodation, an extra page of storage is allocated (only when the storage allocation is below the 16 MB line). If you choose to change the increment size, it is recommended that you adjust for the 16 byte CICS storage check zone.
z/OS® UNIX considerations
- In a multithreaded environment, the anywhere heap is shared by all threads in the process.
- When ALL31(ON) is in effect, Language Environment allocates thread-specific control blocks from the anywhere heap.
Performance consideration
You can improve performance with the ANYHEAP runtime option by specifying values that minimize the number of times the operating system allocates storage. See RPTSTG for information about how to generate a report you can use to determine the optimum values for the ANYHEAP runtime option.
For more information
For more information about heap storage and heap storage tuning with storage report numbers, see z/OS Language Environment Programming Guide.