From 222b8aae0f78210939013ed1592b63b7300636a1 Mon Sep 17 00:00:00 2001 From: DanielGavin Date: Thu, 18 Jan 2024 18:57:12 +0100 Subject: Support new change to odin allocator model --- src/common/allocator.odin | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/common/allocator.odin b/src/common/allocator.odin index 2f4f784..21499a1 100644 --- a/src/common/allocator.odin +++ b/src/common/allocator.odin @@ -43,8 +43,7 @@ scratch_allocator_destroy :: proc(s: ^Scratch_Allocator) { scratch_allocator_proc :: proc( allocator_data: rawptr, mode: mem.Allocator_Mode, - size, - alignment: int, + size, alignment: int, old_memory: rawptr, old_size: int, loc := #caller_location, @@ -121,7 +120,7 @@ scratch_allocator_proc :: proc( } clear(&s.leaked_allocations) - case .Resize: + case .Resize, .Resize_Non_Zeroed: begin := uintptr(raw_data(s.data)) end := begin + uintptr(len(s.data)) old_ptr := uintptr(old_memory) -- cgit v1.2.3