MemoryArena Class Reference

#include <memory.h>

List of all members.

Public Member Functions

 MemoryArena (uint32_t bs=32768)
 ~MemoryArena ()
void * Alloc (uint32_t sz)
template<typename T >
T * Alloc (uint32_t count=1)
void FreeAll ()

Private Attributes

uint32_t curBlockPos
uint32_t blockSize
char * currentBlock
vector< char * > usedBlocks
vector< char * > availableBlocks

Detailed Description

Definition at line 89 of file memory.h.


Constructor & Destructor Documentation

MemoryArena::MemoryArena ( uint32_t  bs = 32768  )  [inline]

Definition at line 92 of file memory.h.

References blockSize, curBlockPos, and currentBlock.

MemoryArena::~MemoryArena (  )  [inline]

Definition at line 97 of file memory.h.

References availableBlocks, currentBlock, FreeAligned(), and usedBlocks.


Member Function Documentation

template<typename T >
T* MemoryArena::Alloc ( uint32_t  count = 1  )  [inline]

Definition at line 122 of file memory.h.

References Alloc().

void* MemoryArena::Alloc ( uint32_t  sz  )  [inline]
void MemoryArena::FreeAll (  )  [inline]

Member Data Documentation

vector<char *> MemoryArena::availableBlocks [private]

Definition at line 142 of file memory.h.

Referenced by Alloc(), FreeAll(), and ~MemoryArena().

uint32_t MemoryArena::blockSize [private]

Definition at line 140 of file memory.h.

Referenced by Alloc(), FreeAll(), and MemoryArena().

uint32_t MemoryArena::curBlockPos [private]

Definition at line 140 of file memory.h.

Referenced by Alloc(), FreeAll(), and MemoryArena().

char* MemoryArena::currentBlock [private]

Definition at line 141 of file memory.h.

Referenced by Alloc(), MemoryArena(), and ~MemoryArena().

vector<char *> MemoryArena::usedBlocks [private]

Definition at line 142 of file memory.h.

Referenced by Alloc(), FreeAll(), and ~MemoryArena().


The documentation for this class was generated from the following file:
Generated on Sat Aug 28 20:00:14 2010 for pbrt by  doxygen 1.6.3