diff options
| author | Matt Valentine-House <matt@eightbitraptor.com> | 2026-04-06 22:37:30 +0100 |
|---|---|---|
| committer | Matt Valentine-House <matt@eightbitraptor.com> | 2026-04-09 13:24:09 +0100 |
| commit | c91977801797ef15a97aa2f325c7458ef393166b (patch) | |
| tree | d07659bdd0c55b8ce5e857e48706ce3e69256d3f | |
| parent | 3c28bb53a7447c1e8b88da1ccbae76801d5b643a (diff) | |
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
| -rw-r--r-- | shape.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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)) { |
