Heap Error

Return to Glossary

A Heap Error is when code inadvertently overwrites control information that the memory management functions use to control heap usage. The application that you are debugging must have been built with the heap check capability.

Each block of allocated Heap Memory consists of a data area, which starts at the address returned by the allocating function, as well as a control area adjacent to the data area, which is needed by the memory management functions to free the memory properly when you deallocate the memory. If you overwrite a control structure in the heap (for example, by writing to elements outside the allocated bounds of an array, or by copying a string into too small a block of allocated memory), the control information is corrupted and might cause incorrect program behavior even if the data areas of other allocated blocks are not overwritten.

Source: https://www.ibm.com/docs/en/rdfa-and-l/9.1.1?topic=view-heap-errors

See: 2.3.4.7 Data Memory Taxonomy