pub struct MemoryReclaimOnThreshold<const D: usize>;
Expand description
A MemoryReclaimPolicy
which reclaims all closed nodes whenever the utilization falls below a threshold.
The threshold is a function of the constant generic parameter D
.
Specifically, memory of closed nodes will be reclaimed whenever the ratio of closed nodes to all nodes exceeds one over 2^D
.
- when
D = 0
: memory will be reclaimed when utilization is below 0.00% (equivalent to never). - when
D = 1
: memory will be reclaimed when utilization is below 50.00%. - when
D = 2
: memory will be reclaimed when utilization is below 75.00%. - when
D = 3
: memory will be reclaimed when utilization is below 87.50%. - when
D = 4
: memory will be reclaimed when utilization is below 93.75%. - …
Auto Trait Implementations§
impl<const D: usize> RefUnwindSafe for MemoryReclaimOnThreshold<D>
impl<const D: usize> Send for MemoryReclaimOnThreshold<D>
impl<const D: usize> Sync for MemoryReclaimOnThreshold<D>
impl<const D: usize> Unpin for MemoryReclaimOnThreshold<D>
impl<const D: usize> UnwindSafe for MemoryReclaimOnThreshold<D>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more