Skip to content

Commit e8d9bc3

Browse files
committed
ALIGN_STACK before calling calloc
1 parent 745b66d commit e8d9bc3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

os/metac_alloc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ void Allocator_Init_(metac_alloc_t* allocator, metac_alloc_t* parent,
3838

3939
allocator->ArenasCapacity = 256;
4040
allocator->ArenasCount = 16;
41+
42+
ALIGN_STACK();
4143
allocator->Arenas = cast(tagged_arena_t*)
4244
calloc(sizeof(tagged_arena_t), allocator->ArenasCapacity);
45+
RESTORE_STACK();
4346

4447
allocator->inuseArenasCount = 0;
4548
allocator->File = file;

0 commit comments

Comments
 (0)