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

#include <TempAllocator.h>

Inheritance diagram for TempAllocatorMalloc:
TempAllocator NonCopyable

Public Member Functions

virtual JPH_OVERRIDE_NEW_DELETE void * Allocate (uint inSize) override
 Allocates inSize bytes of memory, returned memory address must be JPH_RVECTOR_ALIGNMENT byte aligned.
 
virtual void Free (void *inAddress, uint inSize) override
 Frees inSize bytes of memory located at inAddress.
 
- Public Member Functions inherited from TempAllocator
virtual ~TempAllocator ()=default
 Destructor.
 
- Public Member Functions inherited from NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
void operator= (const NonCopyable &)=delete
 

Additional Inherited Members

- Static Public Attributes inherited from TempAllocator
static JPH_OVERRIDE_NEW_DELETE constexpr bool needs_aligned_allocate = JPH_RVECTOR_ALIGNMENT > (JPH_CPU_ADDRESS_BITS == 32? 8 : 16)
 If this allocator needs to fall back to aligned allocations because JPH_RVECTOR_ALIGNMENT is bigger than the platform default.
 

Detailed Description

Implementation of the TempAllocator that just falls back to malloc/free Note: This can be quite slow when running in the debugger as large memory blocks need to be initialized with 0xcd

Member Function Documentation

◆ Allocate()

virtual JPH_OVERRIDE_NEW_DELETE void * TempAllocatorMalloc::Allocate ( uint inSize)
inlineoverridevirtual

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

Implements TempAllocator.

◆ Free()

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

Frees inSize bytes of memory located at inAddress.

Implements TempAllocator.


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