DeadObjectPool Class Reference

#include <DeadObject.hpp>

Public Member Functions

 DeadObjectPool ()
 
 DeadObjectPool (const char *poolID)
 
void init (const char *poolID)
 
void setID (const char *poolID)
 
void empty ()
 
bool isEmpty ()
 
void emptySingle ()
 
bool isEmptySingle ()
 
void checkObjectGrain (DeadObject *obj)
 
void add (DeadObject *obj)
 
void addSortedBySize (DeadObject *obj)
 
void addSortedByLocation (DeadObject *obj)
 
void dumpMemoryProfile (FILE *outfile)
 
void checkObjectOverlap (DeadObject *obj)
 
DeadObjectgetFirst ()
 
DeadObjectlastBlock ()
 
DeadObjectfirstBlock ()
 
DeadObjectfindFit (size_t length)
 
DeadObjectfindFit (size_t length, size_t *realLength)
 
DeadObjectfindBestFit (size_t length)
 
DeadObjectfindSmallestFit (size_t minSize)
 
void addSingle (DeadObject *obj)
 
DeadObjectgetFirstSingle ()
 

Private Member Functions

void logAllocation ()
 
void logReclaim ()
 
void logHit ()
 
void logMiss ()
 
void clearProfile ()
 

Private Attributes

DeadObject anchor
 
const char * id
 

Detailed Description

Definition at line 131 of file DeadObject.hpp.

Constructor & Destructor Documentation

◆ DeadObjectPool() [1/2]

DeadObjectPool::DeadObjectPool ( )
inline

Definition at line 134 of file DeadObject.hpp.

References init().

◆ DeadObjectPool() [2/2]

DeadObjectPool::DeadObjectPool ( const char *  poolID)
inline

Definition at line 136 of file DeadObject.hpp.

References init().

Member Function Documentation

◆ add()

void DeadObjectPool::add ( DeadObject obj)
inline

◆ addSingle()

void DeadObjectPool::addSingle ( DeadObject obj)
inline

◆ addSortedByLocation()

void DeadObjectPool::addSortedByLocation ( DeadObject obj)

◆ addSortedBySize()

void DeadObjectPool::addSortedBySize ( DeadObject obj)

◆ checkObjectGrain()

void DeadObjectPool::checkObjectGrain ( DeadObject obj)
inline

Definition at line 201 of file DeadObject.cpp.

References IsObjectGrained, and Interpreter::logicError().

◆ checkObjectOverlap()

void DeadObjectPool::checkObjectOverlap ( DeadObject obj)

◆ clearProfile()

void DeadObjectPool::clearProfile ( )
inlineprivate

◆ dumpMemoryProfile()

void DeadObjectPool::dumpMemoryProfile ( FILE *  outfile)

◆ empty()

void DeadObjectPool::empty ( )
inline

◆ emptySingle()

void DeadObjectPool::emptySingle ( )
inline

◆ findBestFit()

DeadObject * DeadObjectPool::findBestFit ( size_t  length)

◆ findFit() [1/2]

◆ findFit() [2/2]

DeadObject* DeadObjectPool::findFit ( size_t  length,
size_t *  realLength 
)
inline

◆ findSmallestFit()

DeadObject * DeadObjectPool::findSmallestFit ( size_t  minSize)

◆ firstBlock()

DeadObject* DeadObjectPool::firstBlock ( )
inline

Definition at line 192 of file DeadObject.hpp.

References anchor, and DeadObject::next.

◆ getFirst()

DeadObject* DeadObjectPool::getFirst ( )
inline

◆ getFirstSingle()

DeadObject* DeadObjectPool::getFirstSingle ( )
inline

Definition at line 270 of file DeadObject.hpp.

References anchor, logHit(), logMiss(), and DeadObject::next.

Referenced by NormalSegmentSet::allocateObject().

◆ init()

void DeadObjectPool::init ( const char *  poolID)
inline

Definition at line 140 of file DeadObject.hpp.

Referenced by DeadObjectPool().

◆ isEmpty()

bool DeadObjectPool::isEmpty ( )
inline

Definition at line 156 of file DeadObject.hpp.

References anchor, DeadObject::isReal(), and DeadObject::next.

◆ isEmptySingle()

bool DeadObjectPool::isEmptySingle ( )
inline

Definition at line 158 of file DeadObject.hpp.

References anchor, and DeadObject::next.

◆ lastBlock()

DeadObject* DeadObjectPool::lastBlock ( )
inline

Definition at line 191 of file DeadObject.hpp.

References anchor, and DeadObject::previous.

◆ logAllocation()

void DeadObjectPool::logAllocation ( )
inlineprivate

Definition at line 297 of file DeadObject.hpp.

◆ logHit()

void DeadObjectPool::logHit ( )
inlineprivate

Definition at line 299 of file DeadObject.hpp.

Referenced by findBestFit(), findFit(), findSmallestFit(), getFirst(), and getFirstSingle().

◆ logMiss()

void DeadObjectPool::logMiss ( )
inlineprivate

Definition at line 300 of file DeadObject.hpp.

Referenced by findBestFit(), findFit(), findSmallestFit(), getFirst(), and getFirstSingle().

◆ logReclaim()

void DeadObjectPool::logReclaim ( )
inlineprivate

Definition at line 298 of file DeadObject.hpp.

◆ setID()

void DeadObjectPool::setID ( const char *  poolID)
inline

Definition at line 154 of file DeadObject.hpp.

Referenced by NormalSegmentSet::NormalSegmentSet().

Member Data Documentation

◆ anchor

◆ id

const char* DeadObjectPool::id
private

Definition at line 306 of file DeadObject.hpp.


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