Heap corruption

Both the heap analyzer and the heap monitor detect heap corruption by calling TMemoryHeap::Check after each allocation event and before each deletion event. When the heap is found to be corrupt, the tool writes a message, similar to the following, to the output file and echoes it to the console. In heap monitor output files, an asterisk (*) precedes each subsequent line that indicates the corrupt heap.

      *********************************************************
      ***
      *** Tree heap corrupt with error 5.
      *** See PrivateIncludes/TreeHeapExceptions.h for enums.
      ***
      *********************************************************
The message states that either the tree heap or the chunky heap is corrupt, and it specifies an error number. This number is the return value of Reason() in the TChunkyHeapCorrupted or TTreeHeapCorrupted exception object. To determine its meaning, refer to TreeHeapExceptions.h or ChunkyHeapExceptions.h in the PrivateIncludes directory.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker