This commit is contained in:
Nils O. Selåsdal
2026-06-15 10:50:54 +02:00
parent cec0cd966b
commit 2fed5cbe1b
4 changed files with 17 additions and 6 deletions
+2 -1
View File
@@ -168,12 +168,13 @@ APool *apool_create_ex(Arena *arena, U32 n_elements, U32 element_size, U32 eleme
U32 size = AlignUp(element_size, element_align);
APool *pool = arena_push_type(arena, APool);
Assert(pool != NULL);
pool->align = align;
pool->element_size = size;
pool->arena = arena;
pool->n_elements = n_elements;
pool->free_list = NULL;
pool->start == NULL;
pool->start = NULL;
if (size != APOOL_AUTOGROW) {
U32 total_size = n_elements * size; // Note(nos): guard against unreasonable sizes