Inheritance diagram for CP_Heap:
Public Member Functions | |
Constructor / Destructor | |
CP_Heap () | |
Constructor. | |
~CP_Heap () | |
Destructor. | |
Static Public Attributes | |
static NewFunc | gNewFunc = NULL |
static DeleteFunc | gDeleteFunc = NULL |
Protected Attributes | |
CP_S_MemoryBlock * | fFirstBlock |
SInt32 | fBlockCount |
SInt32 | fLeakCount |
SInt32 | fCurrentBytes |
SInt32 | fHighwaterMark |
SInt32 | fDebugOverhead |
bool | fDontDeleteBlocks |
Static Protected Attributes | |
static CP_Heap * | gInstance = NULL |
Private Member Functions | |
Recording | |
void | FillBlock (void *returnPtr, UInt16 inBlockSize) |
void | DumpOneLeak (const void *inPtr, CP_File &inFile) |
Constructor / Destructor | |
CP_Heap (const CP_Heap &inHeap) | |
operators | |
CP_Heap & | operator= (const CP_Heap &inHeap) |
|
Constructor.
|
|
Destructor.
|
|
|
|
Returns the single instance of this class.
|
|
Allocates a block of memory. If CP_Debug_RecordMemoryAllocations is defined, then extra memory recording / debugging information is added to the allocated block.
|
|
Deallocate a block of memory.
|
|
Returns the current number of bytes allocated.
|
|
Returns the highest number of bytes allocated.
|
|
Returns the number of bytes used for debugging purposes.
|
|
Returns the number of blocks currently marked as leaks.
|
|
Double delete detection. Note: When double delete detection is turn on, the allocated block is only marked as deleted, but not actually deleted from memory so memory useage may dramatically increase.
|
|
Returns the state of the double delete detection flag.
|
|
|
|
Deallocate memory for this object.
|
|
Dump the heap memory recording results.
|
|
Dump allocated memory blocks in the current session.
|
|
Returns a count of the number of leaks in the passed in session index.
|
|
Mark all of our recorded blocks as non leaks.
|
|
Validate a single allocation within our heap.
|
|
Validate the heap.
|
|
Add our debugging info to the allocated memory block.
|
|
Fill our allocated block with garbage values.
|
|
Writes the information about a single leak to the passed in file.
|
|
|
|
|
|
Points to the single instance of ourselves. |
|
|
|
|
|
|
|
|
|
|
|
|
|
Flag to indicate if we delete blocks, or just mark them for double delete detection. |
|
Pointer to the function used to allocate memory. |