#include <memory.h>
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 |
Definition at line 89 of file memory.h.
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.
T* MemoryArena::Alloc | ( | uint32_t | count = 1 |
) | [inline] |
void* MemoryArena::Alloc | ( | uint32_t | sz | ) | [inline] |
Definition at line 104 of file memory.h.
References availableBlocks, blockSize, curBlockPos, currentBlock, and usedBlocks.
Referenced by Alloc(), GridAccel::GridAccel(), KdAccelNode::initLeaf(), SubsurfaceOctreeNode::Insert(), UseRadianceProbes::Li(), SingleScatteringIntegrator::Li(), PhotonIntegrator::Li(), GlossyPRTIntegrator::Li(), DiffusePRTIntegrator::Li(), TransformCache::Lookup(), DipoleSubsurfaceIntegrator::Preprocess(), BVHAccel::recursiveBuild(), LoopSubdiv::Refine(), SHProjectIncidentDirectRadiance(), and SHRotate().
void MemoryArena::FreeAll | ( | ) | [inline] |
Definition at line 128 of file memory.h.
References availableBlocks, blockSize, curBlockPos, and usedBlocks.
Referenced by TransformCache::Clear(), IGIIntegrator::Preprocess(), DipoleSubsurfaceIntegrator::Preprocess(), MetropolisRenderer::Render(), SurfacePointTask::Run(), SamplerRendererTask::Run(), PhotonShootingTask::Run(), MLTTask::Run(), IrradiancePrimeTask::Run(), CreateRadProbeTask::Run(), and SHProjectIncidentIndirectRadiance().
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().