#include <memory.h>
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 |
Definition at line 183 of file memory.h.
| 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.
| void* MemoryArena::Alloc | ( | size_t | sz | ) | [inline] |
Definition at line 198 of file memory.h.
References availableBlocks, blockSize, curBlockPos, currentBlock, cimg_library::cimg::max(), and usedBlocks.
Referenced by lux::BSDF::Alloc(), lux::UnsafeKdAccelNode::initLeaf(), and lux::TaBRecKdAccelNode::initLeaf().
| void MemoryArena::FreeAll | ( | ) | [inline] |
Definition at line 220 of file memory.h.
References availableBlocks, curBlockPos, and usedBlocks.
Referenced by lux::BSDF::FreeAll().
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().
1.6.2-20100208