Class for memory management: This class gives you the full control about 1MByte of Memory. More...
#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. |
Class for memory management: This class gives you the full control about 1MByte of Memory.
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
|
protected |
Marking a Chunk as free and deleting him from the list whose member it presently is.
bool CDebuggingMemoryManager::freeMem | ( | void * | ) |
Deleting Mem.
void* CDebuggingMemoryManager::getMem | ( | CDebuggingMemoryManagerSize | inSize | ) |
Getting Mem.
|
friend |
Output for diagnosis.
|
protected |
THE memory used by this memory administrator.
|
protected |
List of free memory chunks.
|
protected |
List of used memory chunks.