Allocator Builder
Policy Based C++ Template Allocator Library
 All Classes Functions Variables Enumerations Enumerator Groups Pages
alb::v_100::heap< Allocator, NumberOfChunks, ChunkSize > Class Template Reference

#include <heap.hpp>

Public Types

using allocator = Allocator
 

Public Member Functions

 heap (size_t numberOfChunks, size_t chunkSize) noexcept
 
 heap (heap &&x) noexcept
 
heapoperator= (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
 

Detailed Description

template<class Allocator, size_t NumberOfChunks, size_t ChunkSize>
class alb::v_100::heap< Allocator, NumberOfChunks, ChunkSize >

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.

Definition at line 40 of file heap.hpp.


The documentation for this class was generated from the following file: