Abstract class with the basic interface of all the derived memory allocators.
More...
#include <include/reactphysics3d/memory/MemoryAllocator.h>
|
static void * | alignAddress (void *pointer, uint8 alignment) |
| Given a pointer to memory, this method returns the next aligned address. More...
|
|
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. More...
|
|
Abstract class with the basic interface of all the derived memory allocators.
◆ alignAddress() [1/2]
void * MemoryAllocator::alignAddress |
( |
void * |
pointer, |
|
|
uint8 |
alignment |
|
) |
| |
|
static |
Given a pointer to memory, this method returns the next aligned address.
- Parameters
-
pointer | Pointer to a memory location |
alignment | Desired alignment |
- Returns
- Pointer to the next aligned memory location
◆ alignAddress() [2/2]
void * MemoryAllocator::alignAddress |
( |
void * |
pointer, |
|
|
uint8 |
alignment, |
|
|
ptrdiff_t & |
outAlignmentOffset |
|
) |
| |
|
static |
Given a pointer to memory, this method returns the next aligned address and also output the alignment offset.
- Parameters
-
pointer | Pointer to a memory location |
alignment | Desired alignment |
outAlignmentOffset | Output alignment offset needed to align the initial pointer |
- Returns
- Pointer to the next aligned memory location
◆ allocate()
virtual void* reactphysics3d::MemoryAllocator::allocate |
( |
size_t |
size | ) |
|
|
pure virtual |
The documentation for this class was generated from the following files:
- include/reactphysics3d/memory/MemoryAllocator.h
- src/memory/MemoryAllocator.cpp