|
RavEngine
|
#include <SnXmlMemoryPool.h>
Public Member Functions | |
| CMemoryPool (PxProfileAllocatorWrapper &inWrapper) | |
| PxU8 * | allocate () |
| void | deallocate (PxU8 *inData) |
| PxU32 | GetItemSize () |
Template arguments are powers of two. A very fast memory pool that is not memory efficient. It contains a vector of pointers to blocks of memory along with a linked list of free sections. All sections are of the same size so allocating memory is very fast, there isn't a linear search through blocks of indeterminate size. It also means there is memory wasted when objects aren't sized to powers of two.