#include <Debug.h>
Public Member Functions | |
void | ClearMemCheckPoints () |
Clear flags set with NoteMem NoteMem PrintMemoryLeaks AssertMemNoted. | |
Static Public Member Functions | |
static void | Assert (bool cond) |
Assert condition is true. You may want to use the ASSERT macro instead, since it will report file and line number. | |
static void | AssertPtr (const void *vp) |
Check that the pointer points to heap memory. AssertMem Usually results in a heap scan, so performance can be poor. | |
static void | AssertMem (const void *vp, const int size) |
Check that the pointer points to the start of a memory block of size size and validate the memory block (check for over/under writes). AssertPtr. | |
static void | TearDown (bool reallyFree) |
Destroy the debug heap. | |
static void | FreeDebugHeap () |
Delete all memory allocations. Should only be used to reset the environment in unit tests. | |
static void | EnableHeapLocking () |
Enable heap locking with HeapLock() and HeapUnlock. This may help with some multi threaded scenerios, but deadlocks in memory and pointer checks are still possible. | |
static void | HeapLock () |
Lock the debug heap mutex. Mutex EnableHeapLocking UnlockHeap. | |
static void | UnlockHeap () |
Unlock the debug heap mutex. Mutex EnableHeapLocking LockHeap. | |
static void | PrintMemoryLeaks () |
printf any memory blocks that have not been marked with NoteMem. NoteMem ClearMemCheckPoints AssertMemNoted | |
static void | NoteMem (const void *vp) |
PrintMemoryLeaks ClearMemCheckPoints AssertMemNoted | |
static void | AssertMemNoted () |
Check if NoteMem was called for all allocations. NoteMem. | |
static void | AssertMemFree () |
static void | UnitAssert (const char *msg, bool cond) |
Assertion for unit tests, prints messages to Log and does not do a hard assert. Assert. | |
static void | UnitAssertPtr (const char *msg, const void *vp) |
Check that the pointer points to heap memory, prints messages to Log and does not do a hard assert. AssertPtr Usually results in a heap scan, so performance can be poor. | |
static void | UnitAssertMem (const char *msg, const void *vp, const int size) |
Check if NoteMem was called for all allocations. AssertMem. | |
static void | UnitAssertMemNoted (const char *msg) |
Check that the pointer points to the start of a memory block of size size and validate the memory block (check for over/under writes). AssertMemNoted. | |
static void | UnitAssertMemFree (const char *msg) |
Assert that all mem is deallocated. AssertMemFree. |
Static class to replace the C API.
Definition at line 182 of file Debug.h.
static void Debug::AssertMemFree | ( | ) | [inline, static] |
static void Debug::TearDown | ( | bool | reallyFree | ) | [inline, static] |