24 void*
allocate(
size_t size,
const char* typeName,
const char* filename,
int line);
36 void reportError(physx::PxErrorCode::Enum code,
const char* message,
const char* file,
int line);
45 void* buffer =
Memory::Alloc(Memory::HeapType::PhysicsHeap, size);
46 n_assert_fmt(buffer,
"Allocation of %s failed: %s, line: %d", typeName, filename, line);
Definition callbacks.h:19
void deallocate(void *ptr)
Definition callbacks.h:54
~Allocator()
Definition callbacks.h:22
void * allocate(size_t size, const char *typeName, const char *filename, int line)
physx callback for allocating memory, should be at least 16 byte aligned
Definition callbacks.h:43
Definition callbacks.h:33
void reportError(physx::PxErrorCode::Enum code, const char *message, const char *file, int line)
error callback channeling px messages to nebula log system
Definition callbacks.cc:20
#define n_assert_fmt(exp, msg,...)
Definition debug.h:53
Implements a memory related functions.
void * Alloc(HeapType heapType, size_t size, size_t alignment)
Allocate a block of memory from one of the global heaps.
Definition osxmemory.cc:56
void Free(HeapType heapType, void *ptr)
Free a block of memory.
Definition osxmemory.cc:136
Diverse functions for manipulating physics actors.
Definition actorcontext.cc:18