diff --git a/core/log/log_allocator.odin b/core/log/log_allocator.odin index 934f0d643..846a84a62 100644 --- a/core/log/log_allocator.odin +++ b/core/log/log_allocator.odin @@ -80,6 +80,13 @@ log_allocator_proc :: proc(allocator_data: rawptr, mode: runtime.Allocator_Mode, la.prefix, padding, old_memory, old_size, size, alignment, location = location, ) + case .Resize_Non_Zeroed: + logf( + la.level, + "%s%s>>> ALLOCATOR(mode=.Resize_Non_Zeroed, ptr=%p, old_size=%d, size=%d, alignment=%d)", + la.prefix, padding, old_memory, old_size, size, alignment, + location = location, + ) case .Query_Features: logf( la.level, @@ -111,4 +118,4 @@ log_allocator_proc :: proc(allocator_data: rawptr, mode: runtime.Allocator_Mode, } } return data, err -} \ No newline at end of file +} diff --git a/core/mem/virtual/arena.odin b/core/mem/virtual/arena.odin index d15df46ad..f6fbe237f 100644 --- a/core/mem/virtual/arena.odin +++ b/core/mem/virtual/arena.odin @@ -288,7 +288,7 @@ arena_allocator_proc :: proc(allocator_data: rawptr, mode: mem.Allocator_Mode, err = .Mode_Not_Implemented case .Free_All: arena_free_all(arena, location) - case .Resize: + case .Resize, .Resize_Non_Zeroed: old_data := ([^]byte)(old_memory) switch { diff --git a/core/runtime/default_allocators_windows.odin b/core/runtime/default_allocators_windows.odin index a78a4d04e..1b0f78428 100644 --- a/core/runtime/default_allocators_windows.odin +++ b/core/runtime/default_allocators_windows.odin @@ -19,7 +19,7 @@ when ODIN_DEFAULT_TO_NIL_ALLOCATOR { case .Free_All: return nil, .Mode_Not_Implemented - case .Resize: + case .Resize, .Resize_Non_Zeroed: data, err = _windows_default_resize(old_memory, old_size, size, alignment) case .Query_Features: @@ -41,4 +41,4 @@ when ODIN_DEFAULT_TO_NIL_ALLOCATOR { data = nil, } } -} \ No newline at end of file +} diff --git a/vendor/commonmark/cmark.odin b/vendor/commonmark/cmark.odin index 80e33cec4..05f639371 100644 --- a/vendor/commonmark/cmark.odin +++ b/vendor/commonmark/cmark.odin @@ -507,7 +507,7 @@ cmark_allocator_proc :: proc(allocator_data: rawptr, mode: runtime.Allocator_Mod case .Free_All: return nil, .Mode_Not_Implemented - case .Resize: + case .Resize, .Resize_Non_Zeroed: new_ptr := cmark_alloc.realloc(old_memory, c.size_t(size)) res = transmute([]byte)runtime.Raw_Slice{new_ptr, size} if size > old_size { @@ -529,4 +529,4 @@ get_default_mem_allocator_as_odin :: proc() -> runtime.Allocator { procedure = cmark_allocator_proc, data = rawptr(get_default_mem_allocator()), } -} \ No newline at end of file +} diff --git a/vendor/raylib/raylib.odin b/vendor/raylib/raylib.odin index 21d044145..63c663228 100644 --- a/vendor/raylib/raylib.odin +++ b/vendor/raylib/raylib.odin @@ -1683,7 +1683,7 @@ MemAllocatorProc :: proc(allocator_data: rawptr, mode: mem.Allocator_Mode, MemFree(old_memory) return nil, nil - case .Resize: + case .Resize, .Resize_Non_Zeroed: ptr := MemRealloc(old_memory, c.uint(size)) if ptr == nil { err = .Out_Of_Memory