2 #ifndef _CDEBUGMEMORYMANAGER 3 #define _CDEBUGMEMORYMANAGER 4 #include "libMRML/include/uses-declarations.h" 29 #include "libMRML/include/CMutex.h" 30 typedef long CDebuggingMemoryManagerSize;
33 #define MEMSIZE 20000000 59 CDebuggingMemoryManagerSize
mSize;
80 void FreeChunk(
lTChunk* inChunk);
107 void* getMem(CDebuggingMemoryManagerSize inSize);
116 friend ostream& operator <<(ostream& outStream,
lTChunk * mPrev
Previous Item in List.
Definition: CDebuggingMemoryManager.h:44
Class for memory management: This class gives you the full control about 1MByte of Memory...
Definition: CDebuggingMemoryManager.h:75
CDebuggingMemoryManagerSize mSize
Size of this Chunk.
Definition: CDebuggingMemoryManager.h:59
lTChunk * mPreceding
Previous Item in MEMORY.
Definition: CDebuggingMemoryManager.h:50
lTChunk * mUsedList
List of used memory chunks.
Definition: CDebuggingMemoryManager.h:85
lTChunk * mFreeList
List of free memory chunks.
Definition: CDebuggingMemoryManager.h:83
A structure, which is useful to maintain a twice connected list: A list of Chunks and a list of free/...
Definition: CDebuggingMemoryManager.h:41
const long cUnMagic
The magic number to invalidate lTChunk nodes.
Definition: CDebuggingMemoryManager.h:93
const long cMagic
The magic number for valid lTChunk nodes.
Definition: CDebuggingMemoryManager.h:91
lTChunk * mNext
Following Item in List.
Definition: CDebuggingMemoryManager.h:47
long mMagic
We will add to this some stuff to check if the end of this has been overwritten.
Definition: CDebuggingMemoryManager.h:67
This class offers an abstraction from the locking method used.
Definition: CMutex.h:40
lTChunk * mFollowing
Following Item in MEMORY.
Definition: CDebuggingMemoryManager.h:53
CMutex mMutex
for multithreading
Definition: CDebuggingMemoryManager.h:98
lTChunk * mBuffer
THE memory used by this memory administrator.
Definition: CDebuggingMemoryManager.h:88