RavEngine
Loading...
Searching...
No Matches
physx::PxDefaultAllocator Class Reference

default implementation of the allocator interface required by the SDK More...

#include <PxDefaultAllocator.h>

Inheritance diagram for physx::PxDefaultAllocator:
[legend]
Collaboration diagram for physx::PxDefaultAllocator:
[legend]

Public Member Functions

virtual void * allocate (size_t size, const char *, const char *, int)
 Allocates size bytes of memory, which must be 16-byte aligned.
 
virtual void deallocate (void *ptr)
 Frees memory previously allocated by allocate().
 
- Public Member Functions inherited from physx::PxAllocatorCallback
virtual ~PxAllocatorCallback ()
 destructor
 

Detailed Description

default implementation of the allocator interface required by the SDK

Member Function Documentation

◆ allocate()

virtual void * physx::PxDefaultAllocator::allocate ( size_t  size,
const char *  typeName,
const char *  filename,
int  line 
)
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).

Parameters
sizeNumber of bytes to allocate.
typeNameName of the datatype that is being allocated
filenameThe source file which allocated the memory
lineThe source line which allocated the memory
Returns
The allocated block of memory.

Implements physx::PxAllocatorCallback.

◆ deallocate()

virtual void physx::PxDefaultAllocator::deallocate ( void *  ptr)
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).

Parameters
ptrMemory to free.

Implements physx::PxAllocatorCallback.


The documentation for this class was generated from the following file: