fix: do not prepare/release NonMoving space in nursery GC - #1562
Merged
Merged
Conversation
qinsoon
requested changes
Aug 24, 2026
qinsoon
left a comment
Member
There was a problem hiding this comment.
I think modifying CommonGenPlan::prepare/release would be cleaner.
Have something like
/// Prepare Gen. This should be called by a single thread in GC prepare work.
pub fn prepare(&mut self, tls: VMWorkerThread) {
let full_heap = !self.is_current_gc_nursery();
if full_heap {
self.full_heap_gc_count.lock().unwrap().inc();
self.common.prepare(tls, full_heap);
} else {
self.los.prepare(full_heap);
}
self.nursery.prepare(true);
self.nursery
.set_copy_for_sft_trace(Some(CopySemantics::PromoteToMature));
}
/// Release Gen. This should be called by a single thread in GC release work.
pub fn release(&mut self, tls: VMWorkerThread) {
let full_heap = !self.is_current_gc_nursery();
if full_heap {
self.common.release(tls, full_heap);
} else {
self.common.los.release(tls, full_heap);
}
self.nursery.release();
}This would be doing the same thing as sticky Immix -- see how sticky Immix only prepares/releases LOS in a nursery GC and does not call common.prepare/release.
mmtk-core/src/plan/sticky/immix/global.rs
Lines 119 to 156 in fb806c0
Member
|
The style checks for stable Rust failed, but they are irrelevant for this PR. No need to fix them here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #1560