Lumiera
0.pre.03
»edit your freedom«
|
Go to the source code of this file.
A front-end/concept to allow access to custom memory management.
Minimalistic definition scheme for a functor-like object, which can be passed to client code, offering a callback to generate new objects into some custom allocation scheme not further disclosed.
Lumiera employs various flavours of custom memory management, to handle allocation demands from performance critical parts of the application. Irrespective of the actual specifics of the allocation, typically there is some instance of an allocator maintained within a carefully crafted context — leading to the necessity to dependency-inject a suitable front-end into various connected parts of the application, to allow for coherent use of allocation while avoiding tight coupling of implementation internals.
Reduced to the bare minimum, the ability to allocate can be represented as a functor, which accepts arbitrary (suitable) arguments and returns a reference to a newly allocated instance of some specific type; such an allocation front-end may then be passed as additional (template) parameter to associated classes or functions, allowing to generate new objects at stable memory location, which can then be wired internally.
Definition in file allocator-handle.hpp.
Classes | |
struct | AllocatorHandle< TY >::Allocation |
class | AllocatorHandle< TY > |
Placeholder implementation for a custom allocator. More... | |
struct | is_Stateless< FAC > |
Metafunction: probe if the given base factory is possibly monostate. More... | |
class | OwnUniqueAdapter< FAC > |
Adapter to use a generic factory FAC for creating managed object instances with unique ownership. More... | |
struct | OwnUniqueAdapter< FAC >::StatefulDeleter< TY > |
< More... | |
class | StdFactory< ALO > |
< Concepts and Adaptors for custom memory management More... | |
Variables | |
template<class FAC > | |
auto | is_Stateless_v = is_Stateless<FAC>{} |
Namespaces | |
lib | |
Implementation namespace for support and library code. | |