#include <TCNew.h>
Public Member Functions | |
bool | CheckMemory () const |
void | EnableMemoryChecking () |
turn on memory checking | |
void * | Allocate (uint32 size, const char *fileName, sint32 line) |
Method makes memory allocation. | |
void | Free (void *pointer) |
Method frees memory. | |
void | PrintCurrentMemoryAllocation () |
Writes to stdout the memory allocation. | |
void | PrintMemoryLeaks () |
Writes to stdout the memory leaks. | |
~New () | |
Destructor. | |
Static Public Member Functions | |
static New * | GetInstance () |
Get the only TCNew object. | |
Private Member Functions | |
New () | |
Constructor. | |
Private Attributes | |
uint64 | m_num_allocate_calls |
Total number of allocation calls. | |
uint64 | m_num_allocated_pointers |
number of current allocated pointers | |
uint64 | m_max_num_allocated_pointers |
number of max allocated pointers | |
uint64 | m_max_num_allocated_bytes |
number of current allocated bytes | |
uint64 | m_num_allocated_bytes |
number of max allocated bytes | |
bool | m_check_memory |
defines if we are currently checking allocations or not | |
NewPointer * | m_first_pointer |
Pointer to the first allocated memory. | |
NewPointer * | m_last_pointer |
Pointer to the last allocated memory. | |
Static Private Attributes | |
static New * | m_instance |
The one and only TCNew object. |
Definition at line 60 of file TCNew.h.
TC::New::~New | ( | ) |
Destructor.
TC::New::New | ( | ) | [private] |
Constructor.
static New* TC::New::GetInstance | ( | ) | [inline, static] |
Get the only TCNew object.
Definition at line 66 of file TCNew.h.
Referenced by operator delete(), operator delete[](), operator new(), and operator new[]().
bool TC::New::CheckMemory | ( | ) | const [inline] |
void TC::New::EnableMemoryChecking | ( | ) |
turn on memory checking
Method makes memory allocation.
void TC::New::Free | ( | void * | pointer | ) |
Method frees memory.
void TC::New::PrintCurrentMemoryAllocation | ( | ) |
Writes to stdout the memory allocation.
void TC::New::PrintMemoryLeaks | ( | ) |
Writes to stdout the memory leaks.
uint64 TC::New::m_num_allocate_calls [private] |
uint64 TC::New::m_num_allocated_pointers [private] |
uint64 TC::New::m_max_num_allocated_pointers [private] |
uint64 TC::New::m_max_num_allocated_bytes [private] |
uint64 TC::New::m_num_allocated_bytes [private] |
bool TC::New::m_check_memory [private] |
NewPointer* TC::New::m_first_pointer [private] |
NewPointer* TC::New::m_last_pointer [private] |
New* TC::New::m_instance [static, private] |