Skip to content

Commit c919778

Browse files
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
1 parent 3c28bb5 commit c919778

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

shape.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,8 +1539,7 @@ Init_default_shapes(void)
15391539
while (heap_sizes[heaps_count]) {
15401540
heaps_count++;
15411541
}
1542-
attr_index_t *capacities = ALLOC_N(attr_index_t, heaps_count + 1);
1543-
capacities[heaps_count] = 0;
1542+
attr_index_t *capacities = ALLOC_N(attr_index_t, heaps_count);
15441543
size_t index;
15451544
for (index = 0; index < heaps_count; index++) {
15461545
if (heap_sizes[index] > sizeof(struct RBasic)) {

0 commit comments

Comments
 (0)