Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/policy/immix/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,11 @@ impl Block {
if prev_line_is_marked {
holes += 1;
}

// We need to clear the line mark state at least twice in every 128 GC
// otherwise, the line mark state of the last GC will stick around
if line_mark_state > Line::MAX_MARK_STATE - 2 {
line.mark(0);
}
#[cfg(feature = "immix_zero_on_release")]
crate::util::memory::zero(line.start(), Line::BYTES);

Expand Down
3 changes: 3 additions & 0 deletions src/util/alloc/immix_allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ impl<VM: VMBinding> ImmixAllocator<VM> {
block.start(),
block.end()
);
// Bulk clear stale line mark state
Line::MARK_TABLE
.bzero_metadata(block.start(), crate::policy::immix::block::Block::BYTES);
if self.request_for_large {
self.large_bump_pointer.cursor = block.start();
self.large_bump_pointer.limit = block.end();
Expand Down