Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
TempAllocatorImpl Class Referencefinal

Default implementation of the temp allocator that allocates a large block through malloc upfront. More...

#include <TempAllocator.h>

Inheritance diagram for TempAllocatorImpl:
TempAllocator NonCopyable

Public Member Functions

JPH_OVERRIDE_NEW_DELETE TempAllocatorImpl (uint inSize)
 Constructs the allocator with a maximum allocatable size of inSize. More...
 
virtual ~TempAllocatorImpl () override
 Destructor, frees the block. 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...
 
bool IsEmpty () const
 
- 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
 

Detailed Description

Default implementation of the temp allocator that allocates a large block through malloc upfront.

Constructor & Destructor Documentation

◆ TempAllocatorImpl()

JPH_OVERRIDE_NEW_DELETE TempAllocatorImpl::TempAllocatorImpl ( uint  inSize)
inlineexplicit

Constructs the allocator with a maximum allocatable size of inSize.

◆ ~TempAllocatorImpl()

virtual TempAllocatorImpl::~TempAllocatorImpl ( )
inlineoverridevirtual

Destructor, frees the block.

Member Function Documentation

◆ Allocate()

virtual void * TempAllocatorImpl::Allocate ( uint  inSize)
inlineoverridevirtual

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

Implements TempAllocator.

◆ Free()

virtual void TempAllocatorImpl::Free ( void *  inAddress,
uint  inSize 
)
inlineoverridevirtual

Frees inSize bytes of memory located at inAddress.

Implements TempAllocator.

◆ IsEmpty()

bool TempAllocatorImpl::IsEmpty ( ) const
inline

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