|
RavEngine
|
Abstract base class for an application defined memory allocator that allows an external listener to audit the memory allocations. More...
#include <PxBroadcast.h>
Public Member Functions | |
| PxBroadcastingAllocator (PxAllocatorCallback &allocator, PxErrorCallback &error) | |
| The default constructor. | |
| virtual | ~PxBroadcastingAllocator () |
| The default constructor. | |
| void * | allocate (size_t size, const char *typeName, const char *filename, int line) |
| Allocates size bytes of memory, which must be 16-byte aligned. | |
| void | deallocate (void *ptr) |
| Frees memory previously allocated by allocate(). | |
Public Member Functions inherited from physx::PxBroadcast< PxAllocationListener, PxAllocatorCallback > | |
| PxBroadcast () | |
| The default constructor. | |
| void | registerListener (PxAllocationListener &listener) |
| Register new listener. | |
| void | deregisterListener (PxAllocationListener &listener) |
| Deregister an existing listener. | |
| uint32_t | getNbListeners () const |
| Get number of registered listeners. | |
| PxAllocationListener & | getListener (uint32_t index) |
| Get an existing listener from given index. | |
Public Member Functions inherited from physx::PxAllocatorCallback | |
| virtual | ~PxAllocatorCallback () |
| destructor | |
Additional Inherited Members | |
Static Public Attributes inherited from physx::PxBroadcast< PxAllocationListener, PxAllocatorCallback > | |
| static const uint32_t | MAX_NB_LISTENERS |
Protected Attributes inherited from physx::PxBroadcast< PxAllocationListener, PxAllocatorCallback > | |
| physx::PxInlineArray< PxAllocationListener *, MAX_NB_LISTENERS, physx::PxAllocator > | mListeners |
Abstract base class for an application defined memory allocator that allows an external listener to audit the memory allocations.
|
inlinevirtual |
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 |
Implements physx::PxAllocatorCallback.
|
inlinevirtual |
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. |
Implements physx::PxAllocatorCallback.