Public Member Functions | |
const Burger::StaticRTTI * | get_StaticRTTI (void) const noexcept override |
Get the description to the class. | |
AllocatorHandle (MemoryManagerHandle *pMemoryManagerHandle) noexcept | |
Default Constructor. | |
void * | alloc (uintptr_t uSize) const noexcept final |
Allocate memory. | |
void | free (const void *pInput) const noexcept final |
Release memory. | |
void * | realloc (const void *pInput, uintptr_t uSize) const noexcept final |
Reallocate memory. | |
Public Member Functions inherited from Burger::AllocatorBase | |
AllocatorBase () noexcept=default | |
Default constructor. | |
void * | alloc_clear (uintptr_t uSize) const noexcept |
Allocate memory that is preinitialized to zero. | |
void * | alloc_copy (const void *pInput, uintptr_t uSize) const noexcept |
Allocate a buffer and copy data into it. | |
Public Member Functions inherited from Burger::Base | |
const char * | get_class_name (void) const noexcept |
Get the name of the class. | |
virtual | ~Base () noexcept=default |
Destructor. | |
Static Public Attributes | |
static const Burger::StaticRTTI | g_StaticRTTI |
Static Public Attributes inherited from Burger::AllocatorBase | |
static const Burger::StaticRTTI | g_StaticRTTI |
The global description of the class. | |
Static Public Attributes inherited from Burger::Base | |
static const Burger::StaticRTTI | g_StaticRTTI |
The global description of the class. | |
Private Attributes | |
MemoryManagerHandle * | m_pMemoryManagerHandle |
Pointer to MemoryManagerHandle instance for memory allocation. | |
|
inlinenoexcept |
Default Constructor.
pMemoryManagerHandle | Pointer to memory manager |
|
inlinefinalvirtualnoexcept |
Allocate memory.
Allocate memory. If the function fails, return nullptr
uSize | Number of bytes to allocate |
Implements Burger::AllocatorBase.
|
inlinefinalvirtualnoexcept |
Release memory.
If nullptr is passed, do nothing. Otherwise, release the memory.
pInput | Pointer to memory to release, or nullptr. |
Implements Burger::AllocatorBase.
|
overridevirtualnoexcept |
Get the description to the class.
This virtual function will pull the pointer to the StaticRTTI instance that has the name of the class. Due to it being virtual, it will be the name of the most derived class.
Reimplemented from Burger::AllocatorBase.
|
inlinefinalvirtualnoexcept |
Reallocate memory.
Call the virtual function to reallocate memory. If the function fails, the memory in pInput is left intact and nullptr is returned. If uSize is zero, pInput is freed and nullptr is returned.
pInput | Pointer to memory to read from and release |
uSize | Number of bytes to allocate |
Implements Burger::AllocatorBase.
|
static |
|
private |
Pointer to MemoryManagerHandle instance for memory allocation.