Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to deterministically transition to CollectionPhase::Collecting #96

Merged
merged 2 commits into from
May 11, 2024

Conversation

kyren
Copy link
Owner

@kyren kyren commented Apr 22, 2024

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.

@kyren
Copy link
Owner Author

kyren commented May 7, 2024

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.

@kyren kyren merged commit 346db37 into master May 11, 2024
1 check passed
@kyren kyren deleted the transition_to_collect branch July 8, 2024 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant