Heap storage errors can occur when an application allocates a heap
storage element that is too small for it to use, and therefore, accidently
overlays heap storage. If this situation occurs then some of the typical
error messages generated are:
- The node address does not represent a valid node within the heap
segment
- The length of the segment is not valid, or
- The heap segment pointer is not valid.
If one of the above error messages is generated by one of the
reports, then examine the storage element that immediately precedes
the damaged node to determine if this storage element is owned by
the application program. Check the size of the storage element and
ensure that it is sufficient for the program's use. If the size of
the storage element is not sufficient then adjust the allocation size.
If an error occurs indicating that the node's pointers form a circular
loop within the free storage tree, then check the Free Storage Tree
Report to see if such a loop exists. If a loop exists, then contact
the IBM® support center for assistance
because this may be a problem in the Language Environment heap
management routines.
Additional diagnostic information regarding heap damage can be
obtained by using the HEAPCHK runtime option. This option provides
a more accurate time perspective on when the heap damage actually
occurred, which could help to determine the program that caused the
damage. For more information on HEAPCHK, see z/OS Language Environment Programming Reference
.