Closed kyren closed 1 month ago
Changed MarkedArena::collect
to MarkedArena::start_collecting
Added a drive by change from self.metrics.allocation_debt() <= target_debt
to !(self.metrics.allocation_debt() > target_debt)
out of NaN paranoia.
Added an EarlyStop
enum for Context::do_collection
, rather than relying on another custom method.
Changed MarkedArena
to own a &mut Arena
instead of &Arena
. These are equivalent since every method that produces a MarkedArena
takes &mut self
and Rust can't downgrade mutable borrows, but it expresses the intent better, and MarkedArena
now actually calls Context::do_collection
.
This is necessary when trying to use finalization, because you want to be completely out of the marking phase once you have decided finalization is finished for this cycle.