HEAPZONES

Derivation: HEAP check ZONES

The HEAPZONES runtime option is used to turn on overlay toleration and checking for user heaps. When activated, the runtime option affects any obtained storage that can be controlled by the HEAP or HEAP64 runtime options. HEAPZONES also affects storage obtained from a heap pool.

A heap check zone is an additional piece of storage that is appended to an allocated element during a storage request. The size of the check zone depends on the size31 and size64 suboptions of HEAPZONES. The check zone can be examined for overlays when the heap element is freed.

The default value for non-CICS applications is HEAPZONES(0,ABEND,0,ABEND).

The default value for CICS® applications is HEAPZONES(0,ABEND,0,ABEND).

The default value for AMODE 64 applications is HEAPZONES(0,ABEND,0,ABEND).

Read syntax diagramSkip visual syntax diagram
Syntax

                                .-ABEND-.                     .-ABEND-.      
>>-HEAPZones--(--+--------+--,--+-------+--,--+---------+--,--+-------+--)-><
                 '-size31-'     +-QUIET-+     '-size-64-'     +-QUIET-+      
                                +-MSG---+                     +-MSG---+      
                                '-TRACE-'                     '-TRACE-'      

size31
Controls the size of the check zone for all user heap storage which is below the 2 G bar. The check zone size is rounded up to the nearest multiple of 8 bytes. The maximum size allowed for a check zone is 1024 bytes. Specifying a value of 0 indicates that no check zone is active.
size64
Controls the size of the check zone for all user heap storage which is above the 2 G bar. The check zone size is rounded up to the nearest multiple of 8 bytes with a minimum size of 16 bytes. The maximum size allowed for a check zone is 1024 bytes. Specifying a value of 0 indicates that the check zone is not active.
ABEND
Specifies that check zones are validated and if an overlay is detected, a U4042 ABEND reason code 3 is issued.
QUIET
Specifies that a heap check zone is appended to every allocated element, but the check zone is not validated.
MSG
Specifies that check zones are validated and if an overlay is detected, informational messages are issued. For more information about the output for the HEAPZONES runtime option, see z/OS Language Environment Debugging Guide .
TRACE
Specifies that in addition to informational messages, a CEEDUMP containing only a traceback is produced.

Usage notes

  • You cannot set HEAPZONES at the system level, region level, or in the CEEBXITA assembler user exit interface.
  • You cannot specify an active HEAPZONES setting and RPTSTG(ON) simultaneously. An active HEAPZONES setting causes Language Environment® to override RPTSTG to the value OFF and no storage report is produced.
  • There is no interaction between specifying the HEAPZONES and HEAPCHK runtime options, but setting both at the same time is not recommended by IBM®.

Performance considerations

Using heap check zones can result in a performance degradation and significant additional storage usage. IBM recommends setting the size of a heap check zone to the smallest amount feasible by the application.