PxDeviceAllocatorCallback#
Defined in include/cudamanager/PxCudaContextManager.h
-
class PxDeviceAllocatorCallback#
An interface class that the user can implement in order for PhysX to use a user-defined device memory allocator.
Public Functions
-
virtual bool memAlloc(void **ptr, size_t size) = 0#
Allocated device memory.
- Parameters:
ptr – [out] Output pointer to the allocated memory. The returned address must be 256 bytes aligned.
size – [in] The amount of memory to be allocated.
- Returns:
A boolean indicating whether the allocation succeeded or not.
-
virtual bool memFree(void *ptr) = 0#
Frees device memory.
- Parameters:
ptr – [in] The memory to free.
- Returns:
A boolean indicating whether the deallocation succeeded or not.
Protected Functions
-
inline virtual ~PxDeviceAllocatorCallback()#
-
virtual bool memAlloc(void **ptr, size_t size) = 0#