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[in] Pointer to store the allocated address

  • size[in] The amount of memory required

Returns

A boolean indicates the operation succeed or fail

virtual bool memFree(void *ptr) = 0

Frees device memory.

Parameters

ptr[in] The memory to free

Returns

A boolean indicates the operation succeed or fail

Protected Functions

inline virtual ~PxDeviceAllocatorCallback()