pub struct MemoryReclaimOnThreshold<const D: usize, V: Variant, R: MemoryReclaimer<V>> { /* private fields */ }
Expand description
Memory reclaim policy which triggers the reclaim operation whenever the node utilization falls below a certain threshold.
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%.
Trait Implementations§
source§impl<const D: usize, V: Variant, R: MemoryReclaimer<V>> Clone for MemoryReclaimOnThreshold<D, V, R>
impl<const D: usize, V: Variant, R: MemoryReclaimer<V>> Clone for MemoryReclaimOnThreshold<D, V, R>
source§impl<const D: usize, V: Variant, R: MemoryReclaimer<V>> Default for MemoryReclaimOnThreshold<D, V, R>
impl<const D: usize, V: Variant, R: MemoryReclaimer<V>> Default for MemoryReclaimOnThreshold<D, V, R>
source§impl<const D: usize, V, R> MemoryPolicy<V> for MemoryReclaimOnThreshold<D, V, R>where
V: Variant,
R: MemoryReclaimer<V>,
impl<const D: usize, V, R> MemoryPolicy<V> for MemoryReclaimOnThreshold<D, V, R>where
V: Variant,
R: MemoryReclaimer<V>,
Auto Trait Implementations§
impl<const D: usize, V, R> Freeze for MemoryReclaimOnThreshold<D, V, R>
impl<const D: usize, V, R> RefUnwindSafe for MemoryReclaimOnThreshold<D, V, R>where
V: RefUnwindSafe,
R: RefUnwindSafe,
impl<const D: usize, V, R> Send for MemoryReclaimOnThreshold<D, V, R>
impl<const D: usize, V, R> Sync for MemoryReclaimOnThreshold<D, V, R>
impl<const D: usize, V, R> Unpin for MemoryReclaimOnThreshold<D, V, R>
impl<const D: usize, V, R> UnwindSafe for MemoryReclaimOnThreshold<D, V, R>where
V: UnwindSafe,
R: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)