ORIGINAL
All Classes Namespaces Files Functions Variables Typedefs Friends Pages Concepts
original::allocator< TYPE > Class Template Reference

Default memory allocator using allocators utilities. More...

#include <allocator.h>

Inheritance diagram for original::allocator< TYPE >:
Inheritance graph
Collaboration diagram for original::allocator< TYPE >:
Collaboration graph

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.
 
- Public Member Functions inherited from original::allocatorBase< TYPE, allocator >
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

- Public Types inherited from original::allocatorBase< TYPE, allocator >
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 Public Member Functions inherited from original::allocatorBase< TYPE, allocator >
static void destroy (O_TYPE *o_ptr)
 Destroys an object without deallocating.
 

Detailed Description

template<typename TYPE>
class original::allocator< TYPE >

Default memory allocator using allocators utilities.

Template Parameters
TYPEType of objects to allocate

Implements standard-compliant allocator using:

Member Function Documentation

◆ allocate()

template<typename TYPE>
TYPE * original::allocator< TYPE >::allocate ( u_integer size)
overridevirtual

Allocates memory using global operator new.

Parameters
sizeNumber of elements to allocate
Returns
Pointer to allocated memory
Exceptions
allocateErrorWhen memory allocation fails
Note
Returns nullptr if size is 0

Implements original::allocatorBase< TYPE, allocator >.

◆ deallocate()

template<typename TYPE>
void original::allocator< TYPE >::deallocate ( TYPE * ptr,
u_integer size )
overridevirtual

Deallocates memory using global operator delete.

Parameters
ptrPointer to memory to free
sizeNumber of elements (unused in this implementation)

Implements original::allocatorBase< TYPE, allocator >.


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