add resize non zeroed in more places

This commit is contained in:
Colin Davidson
2023-12-04 03:09:13 -08:00
parent 58e4a011c7
commit bfbeb23f54
5 changed files with 14 additions and 7 deletions
+2 -2
View File
@@ -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()),
}
}
}