Inheritance diagram for CP_DefaultHeap:

Public Member Functions | |
Constructor / Destructor | |
| CP_DefaultHeap () | |
| Constructor. | |
| virtual | ~CP_DefaultHeap () |
| Destructor. | |
Allocate / Dealloc | |
| void * | Allocate (UInt32 inSize, bool isArray, const char *inFunction, const char *inFile, int inLine) |
| void | Deallocate (void *inBlock, bool isArray) |
Getters | |
| SInt32 | GetCurrentBytes () const |
| SInt32 | GetHighwaterMark () const |
| SInt32 | GetDebugOverhead () const |
| SInt32 | GetLeakCount () const |
| void | TurnOnDoubleDeleteDetection (bool inTurnOn=true) |
| bool | GetDoubleDeleteDetectionStatus () |
Reporting | |
| void | DumpAllAllocations (CP_File &inFile) |
| void | DumpSessionAllocations (CP_File &outFile, SInt16 inSessionIndex) |
| UInt16 | CountSessionLeaks (SInt16 inSessionIndex) |
| void | MarkAllBlocksNonLeaks () |
Validators | |
| void | ValidateBlock (const void *inPtr) const |
| void | ValidateHeap () const |
Allocate / Dealloc | |
| void * | Allocate (UInt32 inSize, bool isArray, const char *inFunction, const char *inFile, int inLine) |
| void | Deallocate (void *inBlock, bool isArray) |
Getters | |
| SInt32 | GetCurrentBytes () const |
| SInt32 | GetHighwaterMark () const |
| SInt32 | GetDebugOverhead () const |
| SInt32 | GetLeakCount () const |
| void | TurnOnDoubleDeleteDetection (bool inTurnOn=true) |
| bool | GetDoubleDeleteDetectionStatus () |
Reporting | |
| void | DumpAllAllocations (CP_File &inFile) |
| void | DumpSessionAllocations (CP_File &outFile, SInt16 inSessionIndex) |
| UInt16 | CountSessionLeaks (SInt16 inSessionIndex) |
| void | MarkAllBlocksNonLeaks () |
Validators | |
| void | ValidateBlock (const void *inPtr) const |
| void | ValidateHeap () const |
Static Public Member Functions | |
Instance | |
| static CP_Heap * | Instance () |
operators | |
| static void * | operator new (size_t inSize) |
| static void | operator delete (void *inPtr) |
Instance | |
| static CP_Heap * | Instance () |
operators | |
| static void * | operator new (size_t inSize) |
| static void | operator delete (void *inPtr) |
Static Public Attributes | |
| static NewFunc | gNewFunc = NULL |
| static DeleteFunc | gDeleteFunc = NULL |
Protected Member Functions | |
Recording | |
| void | AddDebugInfo (CP_S_MemoryBlock *inBlock, UInt32 inAllocSize, bool inIsArray, const char *inFunction, const char *inFile, int inLine) |
Recording | |
| void | AddDebugInfo (CP_S_MemoryBlock *inBlock, UInt32 inAllocSize, bool inIsArray, const char *inFunction, const char *inFile, int inLine) |
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 |
|
|
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.
|
|
|
|
|
|
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. |
1.4.0