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
This commit is contained in:
Matt Valentine-House committed 2026-04-09 13:24:09 +01:00
1 parent 3c28bb53a7
commit c919778017
1 file changed
+1 -2
Notes: git 2026-04-09 12:25:07 +00:00
+1 -2
View File
@@ -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)) {