From b6e9d3c0bb547011f036e69fce524d5dd19a1531 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Wed, 21 Aug 2024 10:16:00 +0200 Subject: [PATCH] Fix bug in which empty block would not have mark bits cleared --- src/whippet.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/whippet.c b/src/whippet.c index 1f3edda2b..2f77b251e 100644 --- a/src/whippet.c +++ b/src/whippet.c @@ -2153,6 +2153,8 @@ static size_t next_hole(struct gc_mutator *mut) { if (granules < GRANULES_PER_BLOCK) return granules; struct block_summary *summary = block_summary_for_addr(mut->block); + // Sweep mark bytes for completely empty block. + memset(metadata_byte_for_addr(mut->block), 0, GRANULES_PER_BLOCK); block_summary_clear_flag(summary, BLOCK_NEEDS_SWEEP); // Sweeping found a completely empty block. If we are below the // minimum evacuation reserve, take the block.