Fix calculation of arena suballoc alignment

This commit is contained in:
Nic Barker 2024-08-24 15:11:39 +12:00
parent 138a1e717f
commit 983317033c
2 changed files with 29 additions and 22 deletions

View file

@ -6,5 +6,5 @@ typedef struct
} $NAME$;
$NAME$ $NAME$_Allocate_Arena(uint32_t capacity, Clay_Arena *arena) {
return ($NAME$){.capacity = capacity, .length = 0, .internalArray = ($TYPE$ *)Clay__Array_Allocate_Arena(capacity, sizeof($TYPE$), arena)};
return ($NAME$){.capacity = capacity, .length = 0, .internalArray = ($TYPE$ *)Clay__Array_Allocate_Arena(capacity, sizeof($TYPE$), CLAY__ALIGNMENT($TYPE$), arena)};
}