|
Allocator Builder
Policy Based C++ Template Allocator Library
|
#include <heap.hpp>
Public Types | |
| using | allocator = Allocator |
Public Member Functions | |
| heap (size_t numberOfChunks, size_t chunkSize) noexcept | |
| heap (heap &&x) noexcept | |
| heap & | operator= (heap &&x) noexcept |
| size_t | number_of_chunk () const noexcept |
| size_t | chunk_size () const noexcept |
| bool | owns (const block &b) const noexcept |
| block | allocate (size_t n) noexcept |
| void | deallocate (block &b) noexcept |
| void | deallocate_all () noexcept |
| bool | reallocate (block &b, size_t n) noexcept |
| bool | expand (block &b, size_t delta) noexcept |
Static Public Attributes | |
| static constexpr bool | supports_truncated_deallocation = true |
| static constexpr unsigned | alignment = Allocator::alignment |
The Heap implements a classic heap with a pre-allocated size of numberOfChunks_.value() * chunk_size_.value() It has a overhead of one bit per block and linear complexity for allocation and deallocation operations.