From c91977801797ef15a97aa2f325c7458ef393166b Mon Sep 17 00:00:00 2001 From: Matt Valentine-House Date: Mon, 6 Apr 2026 22:37:30 +0100 Subject: Remove extra sentinel from shape capacities This isn't a 0 terminated list anymore because we iterate over heaps_count directly. So we don't need to allocate an extra byte for the sentinel --- shape.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shape.c b/shape.c index 93ccd3eb59..c9169313cf 100644 --- a/shape.c +++ b/shape.c @@ -1539,8 +1539,7 @@ Init_default_shapes(void) while (heap_sizes[heaps_count]) { heaps_count++; } - attr_index_t *capacities = ALLOC_N(attr_index_t, heaps_count + 1); - capacities[heaps_count] = 0; + attr_index_t *capacities = ALLOC_N(attr_index_t, heaps_count); size_t index; for (index = 0; index < heaps_count; index++) { if (heap_sizes[index] > sizeof(struct RBasic)) { -- cgit v1.2.3