wingo pushed a commit to branch wip-whippet
in repository guile.

commit ac016d5f838bc1622ebdd498a55d9a0f3af3806c
Author: Andy Wingo <wi...@igalia.com>
AuthorDate: Mon Oct 7 15:00:45 2024 +0200

    nofl: Fix hole count / size computation for promoted blocks
---
 src/nofl-space.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/nofl-space.h b/src/nofl-space.h
index 01f446ad7..4bf99efdf 100644
--- a/src/nofl-space.h
+++ b/src/nofl-space.h
@@ -1201,6 +1201,10 @@ static void
 nofl_space_promote_blocks(struct nofl_space *space) {
   struct nofl_block_ref block;
   while (!nofl_block_is_null(block = nofl_block_list_pop(&space->promoted))) {
+    block.summary->hole_count = 0;
+    block.summary->hole_granules = 0;
+    block.summary->holes_with_fragmentation = 0;
+    block.summary->fragmentation_granules = 0;
     struct nofl_allocator alloc = { block.addr, block.addr, block };
     nofl_allocator_finish_sweeping_in_block(&alloc, space->sweep_mask);
     atomic_fetch_add(&space->old_generation_granules,

Reply via email to