From 4e15e8eb7e7d5357326eee78e9bb8b78935e9986 Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Tue, 16 Dec 2025 18:29:58 +0100 Subject: [PATCH] allocate the buffer immediately --- cig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cig.h b/cig.h index 6a3e4a8..bf92097 100644 --- a/cig.h +++ b/cig.h @@ -96,7 +96,7 @@ typedef struct arena_allocator { .allocator=BACKING_ALLOCATOR, \ .size=0, \ .capacity=INITIAL_CAPACITY, \ - .data=NULL \ + .data=allocator_alloc(BACKING_ALLOCATOR, INITIAL_CAPACITY) \ }) allocator_t allocator_from_arena(arena_allocator_t *this);