Public Member Functions | |
Constructor / Destructor | |
CP_MemoryTracker () | |
Constructor. | |
virtual | ~CP_MemoryTracker () |
Destructor. | |
Recording | |
void | StartRecording () |
void | StopRecording () |
bool | IsRecording () |
void | RecordAllocation (E_CP_BlockType inBlockType, void *inMemoryBlocksAddress, SInt32 inBlockSize, const char *inFunction, const char *inFile, SInt16 inLine) |
void | RecordDeallocation (void *inMemoryBlocksAddress, bool inDoubleDeleteDetection=false) |
void | DumpTrackingResults () |
void | DumpCurrentSessionTrackingResults (char *inFileName) |
void | DumpSessionTrackingResults (char *inFileName, SInt16 inSession) |
void | DumpSessionTrackingResults (const CP_FileSystemSpec &inFileSpec, SInt16 inSession) |
void | MarkAllBlocksStatus (SInt32 inBlockStatus) |
void | MarkAllBlocksNonLeaks () |
Sessions | |
void | BeginSession (char *inSessionName) |
void | EndSession () |
void | EndSession (const CP_FileSystemSpec &inFileSpec) |
SInt32 | GetCurrentSession () |
CP_String | GetCurrentSessionName () const |
CP_Session_List * | GetSessionsList () |
SInt16 | GetDebugStackCrawlDepth () |
void | SetDebugStackCrawlDepth (SInt16 inDepth) |
Static Public Member Functions | |
Instance | |
static CP_MemoryTracker * | Instance () |
operators | |
static void * | operator new (size_t size) |
static void | operator delete (void *ptr) |
Protected Attributes | |
bool | fAllowRecording |
CP_Resource_List | fAllocatedResources |
CP_Session_List | fSessionsList |
SInt32 | fCurrentSession |
SInt16 | fDebugStackCrawlDepth |
Static Protected Attributes | |
static CP_MemoryTracker * | gInstance = NULL |
Private Member Functions | |
Recording | |
void | DumpAllAllocations (CP_File &outFile) |
SInt32 | CountLeaks () |
Sessions | |
void | DumpSessionAllocations (CP_File &outFile, SInt32 inSessionIndex) |
UInt32 | CountSessionAllocations (SInt32 inSessionIndex) |
|
Constructor.
|
|
Destructor.
|
|
Create our memory heap for objects and returns a pointer to the single instance of this object.
|
|
Turns memory recording on.
|
|
Turns memory recording off.
|
|
Returns true if memory recording is currently turned on.
|
|
Add a new memory allocation to our list of recorded memory blocks.
|
|
Remove a memory allocation record for the passed in address.
|
|
Dump sessions to file from startSession to endSession.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns the index of the current session in the list of sessions.
|
|
|
|
Returns the list of sessions.
|
|
Returns the size of the debug stack recorded with each allocation.
|
|
Sets the size of the debug stack recorded with each allocation.
|
|
Dump sessions to file from startSession to endSession.
|
|
|
|
|
|
|
|
Pointer to ourselves. |
|
Used to temporarlly turn recording off. |
|
List of allocated resources. |
|
List of sessions. |
|
Current recording session. |
|
Length of our stack crawl in memory recordings. |