Skip to main content

Module gc

Module gc 

Source
Expand description

Garbage-collection planning under the §12b bounds. Pure: the backends measure, this decides.

Two bounds hold at once: keep at most keep generations, and keep their store closures within max_bytes. Whichever is exceeded, generations are collected oldest first until both hold. The protected set (I3) is never collected; if it alone exceeds the space bound, everything unprotected is collected and the shortfall is reported (BudgetUnsatisfiable): the budget is then a target, not a guarantee.

Structs§

GcBudget
Owner settings (services.planarian.gc), not manifest options.
GcPlan
SpaceReport
The last collection’s result, for planarian status and the console.

Functions§

plan
Plan a collection. gens are the generations on disk, protect the I3 set; measure gives the size of a set of generations’ combined closures.