nngn
|
Simple allocator which supports reallocation. More...
#include <realloc.h>
Public Types | |
using | value_type = T |
using | pointer = std::add_pointer_t<value_type> |
Public Member Functions | |
pointer | allocate (std::size_t n) noexcept |
pointer | reallocate (pointer p, std::size_t n) noexcept |
void | deallocate (pointer p, std::size_t) noexcept |
Simple allocator which supports reallocation.
Implemented in terms of malloc(3)
, realloc(3)
, and free(3)
(which is why T
must be nngn::trivial). Can be nested in other allocators that provide an optional reallocate
method.
using nngn::reallocator< T >::pointer = std::add_pointer_t<value_type> |
using nngn::reallocator< T >::value_type = T |
|
noexcept |
|
inlinenoexcept |
|
noexcept |