![]() |
Allocators
|
An allocator acting as the last fallback allocator, allocating only nullptr. More...
#include <null_allocator.hpp>
Public Member Functions | |
memory_block | allocate (std::size_t size=0) |
void | deallocate (memory_block &block) |
bool | owns (memory_block &block) |
Checks if the given block is owned by this allocator. More... | |
An allocator acting as the last fallback allocator, allocating only nullptr.
It's a terminal allocator capable of allocating only { nullptr, 0ul } blocks.
Definition at line 20 of file null_allocator.hpp.
|
inline |
Always allocates { nullptr, 0ul } block.
size | Requested allocation size. |
Definition at line 10 of file null_allocator.ipp.
|
inline |
Does nothing.
block | A block to deallocate. |
Definition at line 15 of file null_allocator.ipp.
|
inline |
Checks if the given block is owned by this allocator.
block | A memory_block which ownership is going to be checked. |
Definition at line 21 of file null_allocator.ipp.