MemoryArena Class Reference

#include <memory.h>

Collaboration diagram for MemoryArena:
[legend]

List of all members.

Public Member Functions

 MemoryArena (size_t bs=32768)
 ~MemoryArena ()
void * Alloc (size_t sz)
void FreeAll ()

Private Attributes

size_t curBlockPos
size_t blockSize
int8_t * currentBlock
vector< int8_t * > usedBlocks
vector< int8_t * > availableBlocks

Detailed Description

Definition at line 183 of file memory.h.


Constructor & Destructor Documentation

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

Definition at line 186 of file memory.h.

References blockSize, curBlockPos, and currentBlock.

MemoryArena::~MemoryArena (  )  [inline]

Definition at line 191 of file memory.h.

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


Member Function Documentation

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

Definition at line 220 of file memory.h.

References availableBlocks, curBlockPos, and usedBlocks.

Referenced by lux::BSDF::FreeAll().


Member Data Documentation

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

Definition at line 231 of file memory.h.

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

size_t MemoryArena::blockSize [private]

Definition at line 229 of file memory.h.

Referenced by Alloc(), and MemoryArena().

size_t MemoryArena::curBlockPos [private]

Definition at line 229 of file memory.h.

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

int8_t* MemoryArena::currentBlock [private]

Definition at line 230 of file memory.h.

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

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

Definition at line 231 of file memory.h.

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


The documentation for this class was generated from the following file:
Generated by  doxygen 1.6.2-20100208