RavEngine
Loading...
Searching...
No Matches
physx::CMemoryPoolManager Class Reference

#include <SnXmlMemoryPool.h>

Collaboration diagram for physx::CMemoryPoolManager:
[legend]

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
 

Detailed Description

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.

Member Function Documentation

◆ allocate()

template<typename TObjectType >
TObjectType * physx::CMemoryPoolManager::allocate ( )
inline

allocate an object. Calls constructor on the new memory.

◆ BatchAllocate()

template<typename TObjectType >
TObjectType * physx::CMemoryPoolManager::BatchAllocate ( PxU32  inCount)
inline

allocate an object. Calls constructor on the new memory.

◆ BatchDeallocate()

template<typename TObjectType >
void physx::CMemoryPoolManager::BatchDeallocate ( TObjectType *  inObject,
PxU32  inCount 
)
inline

deallocate an object calling the destructor on the object.
This must be the concrete type, it cannot be a generic type.

◆ deallocate()

template<typename TObjectType >
void physx::CMemoryPoolManager::deallocate ( TObjectType *  inObject)
inline

deallocate an object calling the destructor on the object.
This must be the concrete type, it cannot be a generic type.


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