ReactPhysics3D: reactphysics3d::SingleFrameAllocator Class Reference

| ReactPhysics3D v0.10.2 C++ Physics engine library

Loading...
Searching...
No Matches
Public Member Functions | List of all members
reactphysics3d::SingleFrameAllocator Class Reference

This class represent a memory allocator used to efficiently allocate memory on the heap that is used during a single frame. More...

`#include <include/reactphysics3d/memory/SingleFrameAllocator.h>`

Inheritance diagram for reactphysics3d::SingleFrameAllocator:

## Public Member Functions
| SingleFrameAllocator (MemoryAllocator &baseAllocator)
| Constructor.
virtual | ~SingleFrameAllocator () override
| Destructor.
SingleFrameAllocator & | operator= (SingleFrameAllocator &allocator)=delete
| Assignment operator.
virtual void * | allocate (size_t size) override
| Allocate memory of a given size (in bytes)
virtual void | release (void *pointer, size_t size) override
| Release previously allocated memory.
virtual void | reset ()
| Reset the marker of the current allocated memory.
Public Member Functions inherited from reactphysics3d::MemoryAllocator
| MemoryAllocator ()=default
| Constructor.
virtual | ~MemoryAllocator ()=default
| Destructor.
MemoryAllocator & | operator= (MemoryAllocator &allocator)=default
| Assignment operator.

## Additional Inherited Members
Static Public Member Functions inherited from reactphysics3d::MemoryAllocator
static void * | alignAddress (void *pointer, uint8 alignment)
| Given a pointer to memory, this method returns the next aligned address.
static void * | alignAddress (void *pointer, uint8 alignment, ptrdiff_t &alignmentOffset)
| Given a pointer to memory, this method returns the next aligned address and also output the alignment offset.

## Detailed Description

This class represent a memory allocator used to efficiently allocate memory on the heap that is used during a single frame.

## Member Function Documentation

## ◆ allocate()

void * SingleFrameAllocator::allocate | ( | size_t | size | ) |
| overridevirtual

Allocate memory of a given size (in bytes)

Implements reactphysics3d::MemoryAllocator.

## ◆ release()

void SingleFrameAllocator::release | ( | void * | pointer,
|  | size_t | size )
| overridevirtual

Release previously allocated memory.

Implements reactphysics3d::MemoryAllocator.

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

- include/reactphysics3d/memory/SingleFrameAllocator.h
- src/memory/SingleFrameAllocator.cpp