System documentation of the GNU Image-Finding Tool

Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
CDebuggingMemoryManager Class Reference

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. More...
 
void * getMem (CDebuggingMemoryManagerSize inSize)
 Getting Mem. More...
 
bool freeMem (void *)
 Deleting Mem. More...
 
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. More...
 

Protected Attributes

lTChunkmFreeList
 List of free memory chunks. More...
 
lTChunkmUsedList
 List of used memory chunks. More...
 
lTChunkmBuffer
 THE memory used by this memory administrator. More...
 
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. More...
 

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::CDebuggingMemoryManager ( const CDebuggingMemoryManagerSize  inSize)

Constructor.

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

Member Function Documentation

§ FreeChunk()

void CDebuggingMemoryManager::FreeChunk ( lTChunk inChunk)
protected

Marking a Chunk as free and deleting him from the list whose member it presently is.

§ freeMem()

bool CDebuggingMemoryManager::freeMem ( void *  )

Deleting Mem.

§ getMem()

void* CDebuggingMemoryManager::getMem ( CDebuggingMemoryManagerSize  inSize)

Getting Mem.

Friends And Related Function Documentation

§ operator<<

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

Output for diagnosis.

Member Data Documentation

§ mBuffer

lTChunk* CDebuggingMemoryManager::mBuffer
protected

THE memory used by this memory administrator.

§ mFreeList

lTChunk* CDebuggingMemoryManager::mFreeList
protected

List of free memory chunks.

§ mUsedList

lTChunk* CDebuggingMemoryManager::mUsedList
protected

List of used memory chunks.


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