Lumiera  0.pre.03
»edit your freedom«
AllocationPolicy< I, E, ALO > Struct Template Reference

#include "lib/several-builder.hpp"

Description

template<class I, class E, template< typename > class ALO>
struct lib::allo::AllocationPolicy< I, E, ALO >

Policy Mix-In used to adapt to the ElementFactory and Allocator.

Template Parameters
IInterface type (also used in the lib::Several<I> front-end
Ea common element type to use by default
ALOcustom allocator template

Definition at line 329 of file allocation-cluster.hpp.

Public Types

using Bucket = ArrayBucket< I >
 
using Fac = ElementFactory< I, ALO >
 

Public Member Functions

bool canExpand (Bucket *, size_t)
 Extension point: able to adjust dynamically to the requested size?
 
void moveElem (size_t idx, Bucket *src, Bucket *tar)
 
Bucket * realloc (Bucket *data, size_t cnt, size_t spread)
 
- Public Member Functions inherited from ElementFactory< I, ALO >
 ElementFactory (Allo allo=Allo{})
 
template<typename X >
 ElementFactory (ElementFactory< X, ALO > &relatedFac)
 allow cross-initialisation when using same kind of base allocator
 
Bucket * create (size_t cnt, size_t spread, size_t alignment=alignof(I))
 
template<class E , typename... ARGS>
E & createAt (Bucket *bucket, size_t idx, ARGS &&...args)
 
template<class E >
void destroy (ArrayBucket< I > *bucket)
 

Static Public Attributes

static size_t constexpr ALLOC_LIMIT = size_t(-1) / sizeof(E)
 by default assume that memory is practically unlimited... More...
 

Member Data Documentation

◆ ALLOC_LIMIT

size_t constexpr ALLOC_LIMIT = size_t(-1) / sizeof(E)
static

by default assume that memory is practically unlimited...

Definition at line 304 of file several-builder.hpp.

+ Inheritance diagram for AllocationPolicy< I, E, ALO >:
+ Collaboration diagram for AllocationPolicy< I, E, ALO >:

The documentation for this struct was generated from the following files: