#include <memory.h>
Public Member Functions | |
MemoryArena (u_int bs=32768) | |
~MemoryArena () | |
void * | Alloc (u_int sz) |
void | FreeAll () |
Private Attributes | |
u_int | curBlockPos |
u_int | blockSize |
char * | currentBlock |
vector< char * > | usedBlocks |
vector< char * > | availableBlocks |
Definition at line 73 of file memory.h.
MemoryArena::MemoryArena | ( | u_int | bs = 32768 |
) | [inline] |
Definition at line 76 of file memory.h.
References lux::AllocAligned(), blockSize, curBlockPos, and currentBlock.
MemoryArena::~MemoryArena | ( | ) | [inline] |
Definition at line 81 of file memory.h.
References availableBlocks, currentBlock, lux::FreeAligned(), and usedBlocks.
void* MemoryArena::Alloc | ( | u_int | sz | ) | [inline] |
Definition at line 88 of file memory.h.
References lux::AllocAligned(), availableBlocks, blockSize, curBlockPos, currentBlock, cimg_library::cimg::max(), and usedBlocks.
Referenced by lux::UnsafeKdAccelNode::initLeaf(), and lux::TaBRecKdAccelNode::initLeaf().
void MemoryArena::FreeAll | ( | ) | [inline] |
Definition at line 109 of file memory.h.
References availableBlocks, curBlockPos, and usedBlocks.
vector<char *> MemoryArena::availableBlocks [private] |
Definition at line 120 of file memory.h.
Referenced by Alloc(), FreeAll(), and ~MemoryArena().
u_int MemoryArena::blockSize [private] |
Definition at line 118 of file memory.h.
Referenced by Alloc(), and MemoryArena().
u_int MemoryArena::curBlockPos [private] |
Definition at line 118 of file memory.h.
Referenced by Alloc(), FreeAll(), and MemoryArena().
char* MemoryArena::currentBlock [private] |
Definition at line 119 of file memory.h.
Referenced by Alloc(), MemoryArena(), and ~MemoryArena().
vector<char *> MemoryArena::usedBlocks [private] |
Definition at line 120 of file memory.h.
Referenced by Alloc(), FreeAll(), and ~MemoryArena().