#include <b2_block_allocator.h>
Public Member Functions | |
void * | Allocate (int32 size) |
Allocate memory. This will use b2Alloc if the size is larger than b2_maxBlockSize. More... | |
b2BlockAllocator () | |
void | Clear () |
void | Free (void *p, int32 size) |
Free memory. This will use b2Free if the size is larger than b2_maxBlockSize. More... | |
~b2BlockAllocator () | |
Private Attributes | |
int32 | m_chunkCount |
b2Chunk * | m_chunks |
int32 | m_chunkSpace |
b2Block * | m_freeLists [b2_blockSizeCount] |
This is a small object allocator used for allocating small objects that persist for more than one time step. See: http://www.codeproject.com/useritems/Small_Block_Allocator.asp
Definition at line 37 of file b2_block_allocator.h.
b2BlockAllocator::b2BlockAllocator | ( | ) |
Definition at line 89 of file b2_block_allocator.cpp.
b2BlockAllocator::~b2BlockAllocator | ( | ) |
Definition at line 101 of file b2_block_allocator.cpp.
Allocate memory. This will use b2Alloc if the size is larger than b2_maxBlockSize.
Definition at line 111 of file b2_block_allocator.cpp.
void b2BlockAllocator::Clear | ( | ) |
Definition at line 220 of file b2_block_allocator.cpp.
Free memory. This will use b2Free if the size is larger than b2_maxBlockSize.
Definition at line 171 of file b2_block_allocator.cpp.
|
private |
Definition at line 54 of file b2_block_allocator.h.
|
private |
Definition at line 53 of file b2_block_allocator.h.
|
private |
Definition at line 55 of file b2_block_allocator.h.
|
private |
Definition at line 57 of file b2_block_allocator.h.