#include <CDebuggingMemoryManager.h>
Public Member Functions | |
CDebuggingMemoryManager (const CDebuggingMemoryManagerSize inSize) | |
Constructor. | |
void * | getMem (CDebuggingMemoryManagerSize inSize) |
Getting Mem. | |
bool | freeMem (void *) |
Deleting Mem. | |
bool | isValid () const |
Protected Member Functions | |
void | FreeChunk (lTChunk *inChunk) |
Marking a Chunk as free and deleting him from the list whose member it presently is. | |
Protected Attributes | |
lTChunk * | mFreeList |
List of free memory chunks. | |
lTChunk * | mUsedList |
List of used memory chunks. | |
lTChunk * | mBuffer |
THE memory used by this memory administrator. | |
const long | cMagic |
The magic number for valid lTChunk nodes. | |
const long | cUnMagic |
The magic number to invalidate lTChunk nodes. | |
long | cVM |
CMutex | mMutex |
for multithreading | |
Friends | |
ostream & | operator<< (ostream &outStream, const CDebuggingMemoryManager &inMem) |
Output for diagnosis. |
What is above will be allocated using the normal techniques. This is nice, if you are doubtful about the Libraries you use.
CDebuggingMemoryManager::CDebuggingMemoryManager | ( | const CDebuggingMemoryManagerSize | inSize | ) |
Constructor.
The Parameter is the size of the Buffer administered by the structure
void CDebuggingMemoryManager::FreeChunk | ( | lTChunk * | inChunk | ) | [protected] |
Marking a Chunk as free and deleting him from the list whose member it presently is.
void* CDebuggingMemoryManager::getMem | ( | CDebuggingMemoryManagerSize | inSize | ) |
Getting Mem.
bool CDebuggingMemoryManager::freeMem | ( | void * | ) |
Deleting Mem.
ostream& operator<< | ( | ostream & | outStream, | |
const CDebuggingMemoryManager & | inMem | |||
) | [friend] |
Output for diagnosis.
lTChunk* CDebuggingMemoryManager::mFreeList [protected] |
List of free memory chunks.
lTChunk* CDebuggingMemoryManager::mUsedList [protected] |
List of used memory chunks.
lTChunk* CDebuggingMemoryManager::mBuffer [protected] |
THE memory used by this memory administrator.