|
libcaramel
|
Simple allocator for global allocations. More...
#include <global_resource.hpp>
Public Types | |
| using | pointer = typename memory_resource::pointer |
| using | const_pointer = typename memory_resource::const_pointer |
Public Types inherited from caramel::memory_resource | |
| using | pointer = void * |
| alias for ease of naming | |
| using | const_pointer = const void * |
| alias for ease of naming | |
Public Member Functions | |
| auto | allocate (count_t bytes, align_t alignment) noexcept -> pointer override |
| Pure virtual function for a common allocation interface. More... | |
| void | deallocate (gsl::not_null< pointer > ptr, count_t bytes, align_t alignment) noexcept override |
| Pure virtual function for a common deallocation interface. More... | |
| auto | is_equal (const memory_resource &other) const noexcept -> bool override |
| Pure virtual function for a common comparison interface. More... | |
Public Member Functions inherited from caramel::memory_resource | |
| memory_resource (const memory_resource &) noexcept=default | |
| memory_resource (memory_resource &&) noexcept=default | |
| auto | operator= (const memory_resource &) noexcept -> memory_resource &=default |
| auto | operator= (memory_resource &&) noexcept -> memory_resource &=default |
| auto | operator== (const memory_resource &rhs) const -> bool |
| Check if two memory_resources are equal. More... | |
Simple allocator for global allocations.
|
overridevirtualnoexcept |
Pure virtual function for a common allocation interface.
bytes >= 0, otherwise UB alignment >= 0, otherwise UB| [in] | bytes | The size of the allocation in bytes |
| [in] | alignment | The alignment of the allocation in bytes |
Implements caramel::memory_resource.
|
overridevirtualnoexcept |
Pure virtual function for a common deallocation interface.
bytes >= 0, otherwise UB alignment >= 0, otherwise UB| [in] | ptr | The starting location of the memory chunk |
| [in] | bytes | The size of the allocation in bytes |
| [in] | alignment | The alignment of the allocation in bytes |
Implements caramel::memory_resource.
|
overridevirtualnoexcept |
Pure virtual function for a common comparison interface.
| [in] | other | The memory_resource to compare with. |
Implements caramel::memory_resource.