A storage leak occurs when a program does not return storage back
to the heap after it has finished using it. To determine if this problem
exists, do one of the following:
- The call-level suboption of the HEAPCHK
runtime option causes a
report to be produced in the CEEDUMP. Any still-allocated (that is,
not freed) storage identified by HEAPCHK is listed in the report,
along with the corresponding traceback. This shows any storage that
wasn't freed, as well as all the calls that were involved in allocating
the storage. For more information about the HEAPCHK runtime option,
see z/OS Language Environment Programming Reference .
- Examine the Heap Segment Map report to see if any data areas,
within the allocated storage elements, appear more frequently than
expected. If they do, then check to see if these data areas are still
being used by the application program. If the data areas are not being
used, then change the program to free the storage element after it
is done with it.