ecluse
Safe HaskellNone
LanguageGHC2021

Ecluse.Composition.MemoryPlan.Shed

Description

Reclaim tenant bytes in priority order while preserving explicit storage pins.

Synopsis

Documentation

shedToFit :: TenantDemands -> ShedOutcomes Source #

Walk the shed ladder: every tenant at its desired share, then shed in step order until the sum fits or every tenant hits its minimum. The residual is what shedding cannot reclaim.

cacheEntryBound :: TenantDemands -> ShedOutcomes -> Int Source #

The cache entry bound: an explicit count, or the surviving aggregate divided by the planning allowance per shared local metadata entry slot.