Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
TempAllocator Class Referenceabstract

#include <TempAllocator.h>

Inheritance diagram for TempAllocator:
NonCopyable TempAllocatorImpl TempAllocatorMalloc

Public Member Functions

virtual JPH_OVERRIDE_NEW_DELETE ~TempAllocator ()=default
 Destructor.
 
virtual void * Allocate (uint inSize)=0
 Allocates inSize bytes of memory, returned memory address must be JPH_RVECTOR_ALIGNMENT 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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~TempAllocator()

virtual JPH_OVERRIDE_NEW_DELETE TempAllocator::~TempAllocator ( )
virtualdefault

Destructor.

Member Function Documentation

◆ Allocate()

virtual void * TempAllocator::Allocate ( uint  inSize)
pure virtual

Allocates inSize bytes of memory, returned memory address must be JPH_RVECTOR_ALIGNMENT byte aligned.

Implemented in TempAllocatorImpl, and TempAllocatorMalloc.

◆ Free()

virtual void TempAllocator::Free ( void *  inAddress,
uint  inSize 
)
pure virtual

Frees inSize bytes of memory located at inAddress.

Implemented in TempAllocatorImpl, and TempAllocatorMalloc.


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