7 #include "null_allocator.hpp" 11 namespace boost {
namespace memory {
15 std::size_t alignment>
18 auto end = reserved_block_ + capacity;
19 auto next = align_forward<alignment>(current_ + size);
35 std::size_t alignment>
38 auto previous = align_backward<alignment>(current_ - block.
size);
42 block = {
nullptr, 0ul };
48 std::size_t alignment>
51 return &reserved_block_ <= block.address && block.address <= &reserved_block_ + capacity;
bool owns(memory_block &block) const noexcept
Determines if the block has been allocated with this allocator.
void deallocate(memory_block &block)
Deallocates the block if possible.
memory_block allocate(std::size_t size)
Allocated a block of the requested size on the stack.
std::size_t size
Block's size.
Represents an allocated memory block.