Jolt Physics
A multi core friendly Game Physics Engine
|
Implementation of the TempAllocator that tries to allocate from a large preallocated block, but falls back to malloc when it is exhausted. More...
#include <TempAllocator.h>
Public Member Functions | |
JPH_OVERRIDE_NEW_DELETE | TempAllocatorImplWithMallocFallback (uint inSize) |
Constructs the allocator with an initial fixed block if inSize. More... | |
virtual void * | Allocate (uint inSize) override |
Allocates inSize bytes of memory, returned memory address must be JPH_RVECTOR_ALIGNMENT byte aligned. More... | |
virtual void | Free (void *inAddress, uint inSize) override |
Frees inSize bytes of memory located at inAddress. More... | |
Public Member Functions inherited from TempAllocator | |
virtual JPH_OVERRIDE_NEW_DELETE | ~TempAllocator ()=default |
Destructor. More... | |
virtual void * | Allocate (uint inSize)=0 |
Allocates inSize bytes of memory, returned memory address must be JPH_RVECTOR_ALIGNMENT byte aligned. More... | |
virtual void | Free (void *inAddress, uint inSize)=0 |
Frees inSize bytes of memory located at inAddress. More... | |
Public Member Functions inherited from NonCopyable | |
NonCopyable ()=default | |
NonCopyable (const NonCopyable &)=delete | |
void | operator= (const NonCopyable &)=delete |
Implementation of the TempAllocator that tries to allocate from a large preallocated block, but falls back to malloc when it is exhausted.
|
inlineexplicit |
Constructs the allocator with an initial fixed block if inSize.
|
inlineoverridevirtual |
Allocates inSize bytes of memory, returned memory address must be JPH_RVECTOR_ALIGNMENT byte aligned.
Implements TempAllocator.
|
inlineoverridevirtual |
Frees inSize bytes of memory located at inAddress.
Implements TempAllocator.