Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
MemoryPoolBlob Class Reference

Public Member Functions

 MemoryPoolBlob ()
 
 ~MemoryPoolBlob ()
 
void initBlob (MemoryPool *owningPool, Int allocationCount)
 
void addBlobToList (MemoryPoolBlob **ppHead, MemoryPoolBlob **ppTail)
 
void removeBlobFromList (MemoryPoolBlob **ppHead, MemoryPoolBlob **ppTail)
 
MemoryPoolBlobgetNextInList ()
 accessor
 
Bool hasAnyFreeBlocks ()
 accessor
 
MemoryPoolSingleBlockallocateSingleBlock (DECLARE_LITERALSTRING_ARG1)
 
void freeSingleBlock (MemoryPoolSingleBlock *block)
 
MemoryPoolgetOwningPool ()
 accessor
 
Int getFreeBlockCount ()
 accessor
 
Int getUsedBlockCount ()
 accessor
 
Int getTotalBlockCount ()
 accessor
 

Detailed Description

Definition at line 470 of file GameMemory.cpp.

Constructor & Destructor Documentation

◆ MemoryPoolBlob()

MemoryPoolBlob::MemoryPoolBlob ( )

fill in safe default values.

Definition at line 1155 of file GameMemory.cpp.

◆ ~MemoryPoolBlob()

MemoryPoolBlob::~MemoryPoolBlob ( )

throw away the blob. free the block data, if any.

Definition at line 1170 of file GameMemory.cpp.

Member Function Documentation

◆ addBlobToList()

void MemoryPoolBlob::addBlobToList ( MemoryPoolBlob ** ppHead,
MemoryPoolBlob ** ppTail )

add this blob to a given pool's list-of-blobs

Definition at line 1219 of file GameMemory.cpp.

◆ allocateSingleBlock()

MemoryPoolSingleBlock * MemoryPoolBlob::allocateSingleBlock ( DECLARE_LITERALSTRING_ARG1 )

grab a free block from this blob, mark it as taken, and return it. this method assumes that there is at least one free block in the blob!

Definition at line 1255 of file GameMemory.cpp.

◆ freeSingleBlock()

void MemoryPoolBlob::freeSingleBlock ( MemoryPoolSingleBlock * block)

make this block available for future allocations. it is assumed that the block belongs to this blob, and is not already free.

Definition at line 1285 of file GameMemory.cpp.

◆ getFreeBlockCount()

Int MemoryPoolBlob::getFreeBlockCount ( )
inline

accessor

Definition at line 718 of file GameMemory.cpp.

◆ getNextInList()

MemoryPoolBlob * MemoryPoolBlob::getNextInList ( )
inline

accessor

Definition at line 712 of file GameMemory.cpp.

◆ getOwningPool()

MemoryPool * MemoryPoolBlob::getOwningPool ( )
inline

accessor

Definition at line 716 of file GameMemory.cpp.

◆ getTotalBlockCount()

Int MemoryPoolBlob::getTotalBlockCount ( )
inline

accessor

Definition at line 722 of file GameMemory.cpp.

◆ getUsedBlockCount()

Int MemoryPoolBlob::getUsedBlockCount ( )
inline

accessor

Definition at line 720 of file GameMemory.cpp.

◆ hasAnyFreeBlocks()

Bool MemoryPoolBlob::hasAnyFreeBlocks ( )
inline

accessor

Definition at line 714 of file GameMemory.cpp.

◆ initBlob()

void MemoryPoolBlob::initBlob ( MemoryPool * owningPool,
Int allocationCount )

initialize a Blob; this is called just after the blob is allocated. allocate space for the blocks in this blob and initialize all those blocks.

Definition at line 1180 of file GameMemory.cpp.

◆ removeBlobFromList()

void MemoryPoolBlob::removeBlobFromList ( MemoryPoolBlob ** ppHead,
MemoryPoolBlob ** ppTail )

remove this blob from a given pool's list-of-blobs

Definition at line 1237 of file GameMemory.cpp.


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