RavEngine
Loading...
Searching...
No Matches
physx::CMemoryPool< TItemSize, TItemCount > Class Template Reference

#include <SnXmlMemoryPool.h>

Public Member Functions

 CMemoryPool (PxProfileAllocatorWrapper &inWrapper)
 
PxU8 * allocate ()
 
void deallocate (PxU8 *inData)
 
PxU32 GetItemSize ()
 

Detailed Description

template<PxU8 TItemSize, PxU8 TItemCount>
class physx::CMemoryPool< TItemSize, TItemCount >

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.


The documentation for this class was generated from the following file: