xentara-utils v2.0.3
The Xentara Utility Library
|
Polymorphic placement for placement new. More...
#include <xentara/utils/memory/Placement.hpp>
Public Member Functions | |
virtual | ~Placement ()=0 |
virtual destructor | |
virtual auto | allocate (std::size_t size) -> void *=0 |
Allocates memory for a new object. | |
virtual auto | deallocate (void *storage) noexcept -> void=0 |
Deallocates memory of an already destroyed object. | |
Related Symbols | |
(Note that these are not member symbols.) | |
auto | operator new (std::size_t size, xentara::utils::memory::Placement &placement) -> void * |
Placement new operator for use with Placement. | |
auto | operator delete (void *block, xentara::utils::memory::Placement &placement) -> void |
Placement delete operator for use with Placement. | |
auto | operator new[] (std::size_t size, xentara::utils::memory::Placement &placement) -> void * |
Array placement new operator for use with Placement. | |
auto | operator delete[] (void *block, xentara::utils::memory::Placement &placement) -> void |
Placement delete operator for use with Placement. | |
Polymorphic placement for placement new.
This class can be derived to allow construction of objects using placament new, where the memory needed for the object is allocated by a subclass of the placement.
|
pure virtualdefault |
virtual destructor
|
pure virtual |
Allocates memory for a new object.
size | The size of the block |
std::bad_alloc | Memory could not be allocated |
|
pure virtualnoexcept |
Deallocates memory of an already destroyed object.
storage | A pointer to the storage of the object |
|
related |
|
related |
|
related |
|
related |
Array placement new operator for use with Placement.
To create a new object in a placement, use code like this:
size | The size of the desired block |
placement | The placement |