|
RavEngine
|
#include <SnXmlMemoryPool.h>
Public Member Functions | |
| CMemoryPoolManager (PxAllocatorCallback &inAllocator) | |
| PxProfileAllocatorWrapper & | getWrapper () |
| PxU8 * | allocate (PxU32 inSize) |
| void | deallocate (PxU8 *inMemory) |
| template<typename TObjectType > | |
| TObjectType * | allocate () |
| template<typename TObjectType > | |
| void | deallocate (TObjectType *inObject) |
| template<typename TObjectType > | |
| TObjectType * | BatchAllocate (PxU32 inCount) |
| template<typename TObjectType > | |
| void | BatchDeallocate (TObjectType *inObject, PxU32 inCount) |
Public Attributes | |
| PxProfileAllocatorWrapper | mWrapper |
| CVariableMemoryPool | mVariablePool |
The manager keeps a list of memory pools for different sizes of allocations. Anything too large simply gets allocated using the new operator. This doesn't mark the memory with the size of the allocated memory thus allowing much more efficient allocation of small items. For large enough allocations, it does mark the size.
When using as a general memory manager, you need to wrap this class with something that actually does mark the returned allocation with the size of the allocation.
|
inline |
allocate an object. Calls constructor on the new memory.
|
inline |
allocate an object. Calls constructor on the new memory.
|
inline |
deallocate an object calling the destructor on the object.
This must be the concrete type, it cannot be a generic type.
|
inline |
deallocate an object calling the destructor on the object.
This must be the concrete type, it cannot be a generic type.