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

commit 1abd718145c95d3a7d3dd8804a9dceab82820735
Author: Andy Wingo <wi...@igalia.com>
AuthorDate: Thu Aug 7 10:45:57 2025 +0200

    nofl: Don't collect holes for second-chance allocation if evacuating
---
 src/nofl-space.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/nofl-space.h b/src/nofl-space.h
index c418b5425..6f3f9e1cc 100644
--- a/src/nofl-space.h
+++ b/src/nofl-space.h
@@ -843,7 +843,8 @@ nofl_allocator_release_block(struct nofl_allocator *alloc,
   } else if (space->evacuating) {
     nofl_allocator_release_full_evacuation_target(alloc, space);
   } else {
-    nofl_allocator_finish_sweeping_in_block(alloc, space->survivor_mark, 1);
+    nofl_allocator_finish_sweeping_in_block(alloc, space->survivor_mark,
+                                            !space->evacuating);
     nofl_allocator_release_full_block(alloc, space);
   }
 }
@@ -874,7 +875,7 @@ nofl_allocator_next_hole_in_block_of_size(struct 
nofl_allocator *alloc,
     return 0;
 
   while (1) {
-    nofl_allocator_finish_hole(alloc, min_granules != 0);
+    nofl_allocator_finish_hole(alloc, min_granules && !space->evacuating);
     size_t granules =
       nofl_allocator_next_hole_in_block(alloc, space->survivor_mark);
     if (granules == 0) {
@@ -936,7 +937,7 @@ nofl_allocator_next_hole(struct nofl_allocator *alloc,
         break;
       if (min_granules <= granules)
         return granules;
-      nofl_allocator_finish_hole(alloc, 1);
+      nofl_allocator_finish_hole(alloc, !space->evacuating);
       nofl_allocator_release_full_block(alloc, space);
     }
 

Reply via email to