wingo pushed a commit to branch wip-whippet in repository guile. commit 1990c4ba11b623a204e5c79f85406c36d7f32f0d Author: Andy Wingo <wi...@igalia.com> AuthorDate: Thu Aug 7 10:36:44 2025 +0200
mmc: Only nofl space fragmentation affects need to evacuate --- src/mmc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mmc.c b/src/mmc.c index 4fa8ee714..158dab6bb 100644 --- a/src/mmc.c +++ b/src/mmc.c @@ -581,11 +581,14 @@ heap_last_gc_yield(struct gc_heap *heap) { return 1.0 - ((double) live_size) / heap->size_at_last_gc; } +// Just return fragmentation in the nofl space, it's the only thing that +// matters for deciding whether or not to decide to compact the nofl +// space. static double heap_fragmentation(struct gc_heap *heap) { struct nofl_space *nofl_space = heap_nofl_space(heap); size_t fragmentation = nofl_space_fragmentation(nofl_space); - return ((double)fragmentation) / heap->size; + return ((double)fragmentation) / nofl_space_size(nofl_space); } static size_t