xenium
|
Hazard era allocation strategy for a dynamic number of hazard eras per thread. More...
#include <hazard_eras.hpp>
Inherits xenium::reclamation::detail::generic_hazard_era_allocation_strategy< K_, A, B, ThreadControlBlock >.
Hazard era allocation strategy for a dynamic number of hazard eras per thread.
This strategy uses a linked list of segments for the hazard eras. The first segment can hold K
hazard eras; subsequently allocated segments can hold 1.5x the number of hazard eras as the sum of all previous segments.
The threshold for the number of retired nodes is calculated as A * available_hes + B
, where available_hes
is the max. number of hazard eras that could be allocated by all threads at that time, without growing the number of segments. E.g., if K = 2
and we have two threads each with a single segment, then available_hes = 4
; if one thread later allocates additional hes and increases the number of segments such that they can hold up to 10 hazard eras, then available_hes = 10+2 = 12
.
K
, A
and B
can be configured via template parameter.
K | The initial number of hazard eras (i.e., the number of hes that can be allocated without the need to grow). |
A | |
B |