31 #ifndef PX_DEFAULT_ALLOCATOR_H 32 #define PX_DEFAULT_ALLOCATOR_H 43 #if PX_WINDOWS || PX_LINUX_FAMILY || PX_SWITCH 56 return _aligned_malloc(size, 16);
63 #elif PX_LINUX_FAMILY || PX_SWITCH 66 return ::memalign(16, size);
77 return ::malloc(size);
92 void*
allocate(
size_t size,
const char*,
const char*,
int)
95 PX_ASSERT((reinterpret_cast<size_t>(ptr) & 15)==0);
Definition: GuContactBuffer.h:37
#define PX_FORCE_INLINE
Definition: PxPreprocessor.h:364
void deallocate(void *ptr)
Frees memory previously allocated by allocate().
Definition: PxDefaultAllocator.h:99
PX_FORCE_INLINE void * platformAlignedAlloc(size_t size)
Definition: PxDefaultAllocator.h:75
Abstract base class for an application defined memory allocator that can be used by the Nv library...
Definition: PxAllocatorCallback.h:52
#define PX_ASSERT(exp)
Definition: PxAssert.h:61
PX_FORCE_INLINE void platformAlignedFree(void *ptr)
Definition: PxDefaultAllocator.h:80
default implementation of the allocator interface required by the SDK
Definition: PxDefaultAllocator.h:89
void * allocate(size_t size, const char *, const char *, int)
Allocates size bytes of memory, which must be 16-byte aligned.
Definition: PxDefaultAllocator.h:92