PxVirtualAllocator
Defined in include/foundation/PxAllocator.h
-
class PxVirtualAllocator
Virtual allocator to be used by foundation types to provide run-time defined allocators.
Due to the fact that Array extends its allocator, rather than contains a reference/pointer to it, the VirtualAllocator must be a concrete type containing a pointer to a virtual callback. The callback may not be available at instantiation time, therefore methods are provided to set the callback later.
Public Functions
-
inline PxVirtualAllocator(PxVirtualAllocatorCallback *callback = NULL, int group = 0)
-
inline void *allocate(size_t size, const char *file, int line, uint32_t *cookie = NULL)
-
inline void deallocate(void *ptr, uint32_t *cookie = NULL)
-
inline void setCallback(PxVirtualAllocatorCallback *callback)
-
inline PxVirtualAllocatorCallback *getCallback()
-
inline PxVirtualAllocator(PxVirtualAllocatorCallback *callback = NULL, int group = 0)