Abstract base class for an application defined memory allocator that can be used by the Nv library. More...
#include <PxAllocatorCallback.h>
Public Member Functions | |
virtual | ~PxAllocatorCallback () |
destructor More... | |
virtual void * | allocate (size_t size, const char *typeName, const char *filename, int line)=0 |
Allocates size bytes of memory, which must be 16-byte aligned. More... | |
virtual void | deallocate (void *ptr)=0 |
Frees memory previously allocated by allocate(). More... | |
Abstract base class for an application defined memory allocator that can be used by the Nv library.
Threading: All methods of this class should be thread safe as it can be called from the user thread or the physics processing thread(s).
|
inlinevirtual |
destructor
|
pure virtual |
Allocates size bytes of memory, which must be 16-byte aligned.
This method should never return NULL. If you run out of memory, then you should terminate the app or take some other appropriate action.
Threading: This function should be thread safe as it can be called in the context of the user thread and physics processing thread(s).
size | Number of bytes to allocate. |
typeName | Name of the datatype that is being allocated |
filename | The source file which allocated the memory |
line | The source line which allocated the memory |
Implemented in PxDefaultAllocator.
Referenced by PxSerializerDefaultAdapter< T >::exportData().
|
pure virtual |
Frees memory previously allocated by allocate().
Threading: This function should be thread safe as it can be called in the context of the user thread and physics processing thread(s).
ptr | Memory to free. |
Implemented in PxDefaultAllocator.
Referenced by PxSerializerDefaultAdapter< T >::exportData().