![]() |
Jolt Physics
A multi core friendly Game Physics Engine
|
#include <TempAllocator.h>
Public Member Functions | |
| virtual | ~TempAllocator ()=default |
| Destructor. | |
| virtual void * | Allocate (uint inSize)=0 |
| Allocates inSize bytes of memory, returned memory address must be alignment_size byte aligned. | |
| virtual void | Free (void *inAddress, uint inSize)=0 |
| Frees inSize bytes of memory located at inAddress. | |
Public Member Functions inherited from NonCopyable | |
| NonCopyable ()=default | |
| NonCopyable (const NonCopyable &)=delete | |
| void | operator= (const NonCopyable &)=delete |
Static Public Attributes | |
| static JPH_OVERRIDE_NEW_DELETE constexpr uint | alignment_size = max(JPH_VECTOR_ALIGNMENT, JPH_RVECTOR_ALIGNMENT) |
| Alignment of the allocations made by this allocator. | |
| static constexpr bool | needs_aligned_allocate = alignment_size > JPH_DEFAULT_ALLOCATE_ALIGNMENT |
| If this allocator needs to fall back to aligned allocations because alignment_size is bigger than the platform default. | |
Allocator for temporary allocations. This allocator works as a stack: The blocks must always be freed in the reverse order as they are allocated. Note that allocations and frees can take place from different threads, but the order is guaranteed though job dependencies, so it is not needed to use any form of locking.
|
virtualdefault |
Destructor.
|
pure virtual |
Allocates inSize bytes of memory, returned memory address must be alignment_size byte aligned.
Implemented in TempAllocatorImpl, TempAllocatorImplWithMallocFallback, and TempAllocatorMalloc.
|
pure virtual |
Frees inSize bytes of memory located at inAddress.
Implemented in TempAllocatorImpl, TempAllocatorImplWithMallocFallback, and TempAllocatorMalloc.
|
staticconstexpr |
Alignment of the allocations made by this allocator.
|
staticconstexpr |
If this allocator needs to fall back to aligned allocations because alignment_size is bigger than the platform default.