Skip to content

Commit

Permalink
Support new change to odin allocator model
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielGavin committed Jan 18, 2024
1 parent abce686 commit 222b8aa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/common/allocator.odin
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 222b8aa

Please sign in to comment.