From cbb731b42b1f122261501d64d5f33f01bd2ea24f Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Thu, 29 Sep 2022 22:18:12 +0200 Subject: [PATCH] Fix alignment on temp allocators. --- lib/std/core/allocators/temp_allocator.c3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/core/allocators/temp_allocator.c3 b/lib/std/core/allocators/temp_allocator.c3 index 9b43ec38c..560ff2927 100644 --- a/lib/std/core/allocators/temp_allocator.c3 +++ b/lib/std/core/allocators/temp_allocator.c3 @@ -61,7 +61,7 @@ private fn void*! temp_allocator_function(Allocator* data, usize size, usize ali case ALIGNED_CALLOC: assert(!old_pointer, "Unexpected old pointer for alloc."); if (!size) return null; - return arena._alloc(size, alignment, offset, true); + return arena._alloc(size, alignment_for_allocation(alignment), offset, true); case ALLOC: case ALIGNED_ALLOC: assert(!old_pointer, "Unexpected old pointer for alloc.");