Default memory allocator using allocators utilities. More...
#include <allocator.h>
Public Member Functions | |
TYPE * | allocate (u_integer size) override |
Allocates memory using global operator new. | |
void | deallocate (TYPE *ptr, u_integer size) override |
Deallocates memory using global operator delete. | |
![]() | |
constexpr | allocatorBase () |
Constructs a new allocatorBase instance. | |
void | construct (O_TYPE *o_ptr, Args &&... args) |
Constructs an object in allocated memory. | |
virtual | ~allocatorBase ()=0 |
Virtual destructor. | |
Additional Inherited Members | |
![]() | |
using | propagate_on_container_copy_assignment |
No propagation on copy. | |
using | propagate_on_container_move_assignment |
No propagation on move. | |
using | propagate_on_container_swap |
No propagation on swap. | |
using | propagate_on_container_merge |
No propagation on merge. | |
using | rebind_alloc |
Rebinds allocator to different type. | |
![]() | |
static void | destroy (O_TYPE *o_ptr) |
Destroys an object without deallocating. | |
Default memory allocator using allocators utilities.
TYPE | Type of objects to allocate |
Implements standard-compliant allocator using:
|
overridevirtual |
Allocates memory using global operator new.
size | Number of elements to allocate |
allocateError | When memory allocation fails |
Implements original::allocatorBase< TYPE, allocator >.
|
overridevirtual |
Deallocates memory using global operator delete.
ptr | Pointer to memory to free |
size | Number of elements (unused in this implementation) |
Implements original::allocatorBase< TYPE, allocator >.