Skip to main content

RECLAIM_FRACTION

Constant RECLAIM_FRACTION 

Source
const RECLAIM_FRACTION: usize = 10;
Expand description

Fraction of capacity a sweep reclaims in one pass.

Evicting down to a low-water mark is what keeps the O(n) scan off the hot path: a saturated cache would otherwise pay a full scan on every write, forever. Reclaiming a tenth means the next ~capacity/10 inserts find room already waiting and return immediately.