ANSI Memory Manager object. More...
Public Member Functions | |
const Burger::StaticRTTI * | get_StaticRTTI (void) const noexcept override |
Get the description to the class. | |
AllocatorANSI () noexcept=default | |
Default constructor. | |
void * | alloc (uintptr_t uSize) const noexcept final |
Calls malloc(). | |
void | free (const void *pInput) const noexcept final |
Calls free(). | |
void * | realloc (const void *pInput, uintptr_t uSize) const noexcept final |
Calls realloc(). | |
Public Member Functions inherited from Burger::AllocatorBase | |
const Burger::StaticRTTI * | get_StaticRTTI (void) const noexcept override |
Get the description to the class. | |
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 |
The global description of the class. | |
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. | |
ANSI Memory Manager object.
This class allocates and releases memory using the ANSI malloc(), free() and realloc() calls. No support is present to track memory. If memory tracking is desired either use native memory tracking or use AllocatorHandle instead.
Use this object to instruct functions that allocate memory to use malloc/free as the memory allocation system.
|
defaultnoexcept |
Default constructor.
|
finalvirtualnoexcept |
Calls malloc().
Calls malloc() and returns the pointer allocated. If the requested memory size is zero or the call fails, a nullptr is returned.
uSize | Number of byte requested to allocate. |
Implements Burger::AllocatorBase.
|
finalvirtualnoexcept |
|
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::Base.
|
finalvirtualnoexcept |
Calls realloc().
Calls realloc() and returns the pointer allocated. If the requested memory size is zero or the call fails, a nullptr is returned.
If the function fails, the buffer in pInput is untouched, even though the function returned nullptr. However, if the value in uSize is zero, the buffer is freed in all cases with a call to free().
pInput | Pointer to a valid buffer to resize. |
uSize | Number of byte requested to allocate. |
Implements Burger::AllocatorBase.
|
static |
The global description of the class.
This record contains the name of this class and a reference to the parent