Lumiera  0.pre.03
»edit your freedom«
ExtentFamily_test Class Reference

Description

Test:
document and verify a memory management scheme to maintain a flexible set of »memory extents« for cyclic usage.
See also
BlockFlow_test

Definition at line 48 of file extent-family-test.cpp.

Private Member Functions

void iteration ()
 
void reuseUnclean ()
 
virtual void run (Arg)
 
void simpleUsage ()
 
void use_and_drop ()
 
void wrapAround ()
 

Additional Inherited Members

- Public Member Functions inherited from Test
virtual ~Test ()=default
 this is an interface
 
lib::Random makeRandGen ()
 build a dedicated new RandomGen, seeded from the default-Gen
 
virtual void run (Arg arg)=0
 
void seedRand ()
 draw a new random seed from a common nucleus, and re-seed the default-Gen.
 
- Static Public Member Functions inherited from Test
static string firstTok (Arg)
 conveniently pick the first token from the argument line
 
static uint firstVal (Arg, uint=1)
 conveniently use some number given as argument, with optional default
 

Member Function Documentation

◆ simpleUsage()

void simpleUsage ( )
inlineprivate
Test:
demonstrate a simple usage scenario

Definition at line 66 of file extent-family-test.cpp.

References ExtentFamily< T, siz >::openNew(), and lib::rani().

+ Here is the call graph for this function:

◆ use_and_drop()

void use_and_drop ( )
inlineprivate
Test:
verify claiming new and discarding old slots

Definition at line 85 of file extent-family-test.cpp.

◆ iteration()

void iteration ( )
inlineprivate
Test:
verify access to the extents by iteration, thereby possibly claiming the next extents

Definition at line 112 of file extent-family-test.cpp.

◆ reuseUnclean()

void reuseUnclean ( )
inlineprivate
Test:
verify that neither constructors nor destructors are invoked automatically when discarding or re-using extents.

Definition at line 162 of file extent-family-test.cpp.

References ExtentFamily< T, siz >::openNew(), and lib::rani().

+ Here is the call graph for this function:

◆ wrapAround()

void wrapAround ( )
inlineprivate
Test:
verify in detail how iteration wraps around to also reuse previously dropped extents, possibly rearranging the internal management-vector to allow growing new extents at the end.
  • existing allocations are re-used cyclically
  • this may lead to a »wrapped« internal state
  • necessitating to expand allocations in the middle
  • yet all existing Extent addresses remain stable

Definition at line 238 of file extent-family-test.cpp.

References lib::explore().

+ Here is the call graph for this function:
+ Inheritance diagram for ExtentFamily_test:
+ Collaboration diagram for ExtentFamily_test:

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