diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2024-01-18 18:57:12 +0100 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2024-01-18 18:57:12 +0100 |
| commit | 222b8aae0f78210939013ed1592b63b7300636a1 (patch) | |
| tree | 277ade0596cfc0a03631102902c4155f4eccc6ed /src | |
| parent | abce6860e938dd1a391ae738f5a0a39c1daaf38b (diff) | |
Support new change to odin allocator model
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/allocator.odin | 5 |
1 files changed, 2 insertions, 3 deletions
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)
|