diff --git a/libguile/whippet/src/mmc.c b/libguile/whippet/src/mmc.c index a65219a50..b35fd58b1 100644 --- a/libguile/whippet/src/mmc.c +++ b/libguile/whippet/src/mmc.c @@ -209,7 +209,8 @@ gc_visit_ephemeron_key(struct gc_edge edge, struct gc_heap *heap) { if (large_object_space_contains_with_lock(lospace, ref)) return large_object_space_is_marked(lospace, ref); - GC_CRASH(); + // Assume it is in the extern space. + return 1; } static int @@ -585,9 +586,11 @@ grow_heap_if_necessary(struct gc_heap *heap, struct nofl_space *nofl = heap_nofl_space(heap); size_t pending = nofl_space_shrink(nofl, 0); + // If we cannot defragment and are making no progress but have a + // growable heap, expand by 25% to add some headroom. size_t needed_headroom = GC_CONSERVATIVE_TRACE - ? nofl_active_block_count (nofl) * NOFL_BLOCK_SIZE / 16 + ? (progress ? 0 : nofl_active_block_count (nofl) * NOFL_BLOCK_SIZE / 4) : 0; size_t headroom = nofl_empty_block_count(nofl) * NOFL_BLOCK_SIZE; diff --git a/libguile/whippet/src/pcc.c b/libguile/whippet/src/pcc.c index f57b53b6c..d5eb50cd1 100644 --- a/libguile/whippet/src/pcc.c +++ b/libguile/whippet/src/pcc.c @@ -461,7 +461,9 @@ int gc_visit_ephemeron_key(struct gc_edge edge, struct gc_heap *heap) { if (large_object_space_contains_with_lock(heap_large_object_space(heap), ref)) return large_object_space_is_marked(heap_large_object_space(heap), ref); - GC_CRASH(); + + // Assume it is in the extern space. + return 1; } static int mutators_are_stopping(struct gc_heap *heap) { diff --git a/libguile/whippet/src/semi.c b/libguile/whippet/src/semi.c index 9eaa6530d..d449dfc94 100644 --- a/libguile/whippet/src/semi.c +++ b/libguile/whippet/src/semi.c @@ -278,7 +278,8 @@ int gc_visit_ephemeron_key(struct gc_edge edge, struct gc_heap *heap) { } else if (large_object_space_contains_with_lock(heap_large_object_space(heap), ref)) { return large_object_space_is_marked(heap_large_object_space(heap), ref); } - GC_CRASH(); + // Assume it is in the extern space. + return 1; } static void trace(struct gc_edge edge, struct gc_heap *heap, void *visit_data) {