Lumiera  0.pre.03
»edit your freedom«
AllocatorHandle< TY > Class Template Reference

#include "lib/allocator-handle.hpp"

Description

template<typename TY>
class lib::AllocatorHandle< TY >

Placeholder implementation for a custom allocator.

Todo:

shall be replaced by an AllocationCluster eventually

5/2024 to be reworked and aligned with a prospective C++20 Allocator Concept /////////////////////TICKET #1366

Remarks
using std::list container, since re-entrant allocation calls are possible, meaning that further allocations will be requested recursively from a ctor. Moreover, for the same reason we separate the allocation from the ctor call, so we can capture the address of the new allocation prior to any possible re-entrant call, and handle clean-up of allocation without requiring any additional state flags.....

Definition at line 296 of file allocator-handle.hpp.

Public Member Functions

 ~AllocatorHandle ()
 
template<typename... ARGS>
TY & operator() (ARGS &&...args)
 

Classes

struct  Allocation
 

Private Attributes

std::list< Allocationstorage_
 

Constructor & Destructor Documentation

◆ ~AllocatorHandle()

~AllocatorHandle ( )
inline
Note
need to do explicit clean-up, since a ctor-call might have been failed, and we have no simple way to record this fact internally in Allocation, short of wasting additional memory for a flag to mark this situation

Definition at line 347 of file allocator-handle.hpp.

+ Inheritance diagram for AllocatorHandle< TY >:
+ Collaboration diagram for AllocatorHandle< TY >:

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