System documentation of the GNU Image-Finding Tool

CDebuggingMemoryManager Class Reference

Class for memory management: This class gives you the full control about 1MByte of Memory. More...

#include <CDebuggingMemoryManager.h>

List of all members.

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

lTChunkmFreeList
 List of free memory chunks.
lTChunkmUsedList
 List of used memory chunks.
lTChunkmBuffer
 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.


Detailed Description

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.


Constructor & Destructor Documentation

CDebuggingMemoryManager::CDebuggingMemoryManager ( const CDebuggingMemoryManagerSize  inSize  ) 

Constructor.

The Parameter is the size of the Buffer administered by the structure


Member Function Documentation

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.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  outStream,
const CDebuggingMemoryManager inMem 
) [friend]

Output for diagnosis.


Member Data Documentation

List of free memory chunks.

List of used memory chunks.

THE memory used by this memory administrator.


The documentation for this class was generated from the following file:

Need for discussion? Want to contribute? Contact
help-gift@gnu.org Generated using Doxygen