Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
BlockFlow< CONF >::AllocatorHandle Class Reference

#include "vault/gear/block-flow.hpp"

Description

template<class CONF = blockFlow::DefaultConfig>
class vault::gear::BlockFlow< CONF >::AllocatorHandle

Local handle to allow allocating a collection of Activities, all sharing a common deadline.

Internally, these records are maintained in fixed-sized extents and thus allocations may overflow — leading to allocation of further extents. However, this extension is handled transparently by the embedded iterator. Moreover, a back-connection to the BlockFlow instance is maintained, enabling the latter to manage the Epoch spacing dynamically.

Definition at line 456 of file block-flow.hpp.

Public Member Functions

 AllocatorHandle (RawIter slot, BlockFlow *parent)
 
template<typename... ARGS>
Activitycreate (ARGS &&...args)
 Main API operation: allocate a new Activity record.
 
Time currDeadline () const
 
bool hasFreeSlot () const
 

Private Member Functions

void * claimSlot ()
 

Private Attributes

EpochIter epoch_
 
BlockFlowflow_
 

Constructor & Destructor Documentation

◆ AllocatorHandle()

template<class CONF = blockFlow::DefaultConfig>
AllocatorHandle ( RawIter  slot,
BlockFlow parent 
)
inline

Definition at line 462 of file block-flow.hpp.

Member Function Documentation

◆ create()

template<class CONF = blockFlow::DefaultConfig>
template<typename... ARGS>
Activity & create ( ARGS &&...  args)
inline

Main API operation: allocate a new Activity record.

Definition at line 472 of file block-flow.hpp.

References BlockFlow< CONF >::AllocatorHandle::claimSlot().

Referenced by BlockFlow_test::placeActivity(), BlockFlow_test::simpleUsage(), and BlockFlow_test::storageFlow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ currDeadline()

template<class CONF = blockFlow::DefaultConfig>
Time currDeadline ( ) const
inline

Definition at line 477 of file block-flow.hpp.

References BlockFlow< CONF >::AllocatorHandle::epoch_.

Referenced by BlockFlow_test::placeActivity().

+ Here is the caller graph for this function:

◆ hasFreeSlot()

template<class CONF = blockFlow::DefaultConfig>
bool hasFreeSlot ( ) const
inline

Definition at line 478 of file block-flow.hpp.

References BlockFlow< CONF >::AllocatorHandle::epoch_.

Referenced by BlockFlow_test::placeActivity().

+ Here is the caller graph for this function:

◆ claimSlot()

template<class CONF = blockFlow::DefaultConfig>
void * claimSlot ( )
inlineprivate

Definition at line 483 of file block-flow.hpp.

References Epoch< ALO >::deadline(), BlockFlow< CONF >::AllocatorHandle::epoch_, BlockFlow< CONF >::AllocatorHandle::flow_, BlockFlow< CONF >::getEpochStep(), BlockFlow< CONF >::lastEpoch(), BlockFlow< CONF >::markEpochOverflow(), and Epoch< ALO >::setup().

Referenced by BlockFlow< CONF >::AllocatorHandle::create().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ epoch_

template<class CONF = blockFlow::DefaultConfig>
EpochIter epoch_
private

◆ flow_

template<class CONF = blockFlow::DefaultConfig>
BlockFlow* flow_
private

Definition at line 459 of file block-flow.hpp.

Referenced by BlockFlow< CONF >::AllocatorHandle::claimSlot().

+ Collaboration diagram for BlockFlow< CONF >::AllocatorHandle:

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