Lumiera  0.pre.03
»edit your freedom«
allocation-cluster.cpp File Reference

Go to the source code of this file.

Description

Implementation of memory management helper functions for the render engine model.

Here, in the actual translation unit, the generic part of these functions is emitted, while the corresponding header provides a strictly typed front-end, based on templates, which forward to the implementation eventually.

low-level trickery
The StorageManager implementation exploits object layout knowledge in order to operate with the bare minimum of administrative overhead; notably the next allocation is always located within the current extent and by assuming that the remaining size is tracked correctly, the start of the current extent can always be re-discovered; the sequence of extents is managed as a linked list, where the next* resides in the first »slot« within each Extent; this pointer is dressed up (reinterpreted) as a lib::LinkedElements with a heap allocator, which ends up performing the actual allocation in blocks of EXTENT_SIZ.

Definition in file allocation-cluster.cpp.

Classes

struct  AllocationCluster::StorageManager::Extent
 Block of allocated storage. More...
 
union  AllocationCluster::StorageManager::ManagementView
 
struct  PolicyInvokeDtor
 Special allocator-policy for lib::LinkedElements. More...
 
class  AllocationCluster::StorageManager
 An overlay view for the AllocationCluster to add functionality for adding / clearing extents and registering optional deleter functions. More...
 

Namespaces

 lib
 Implementation namespace for support and library code.
 

Class Documentation

◆ lib::AllocationCluster::StorageManager::ManagementView

union lib::AllocationCluster::StorageManager::ManagementView
Class Members
Storage storage
Extents extents
+ Collaboration diagram for AllocationCluster::StorageManager::ManagementView: