Add Allocator_Mode.Alloc_Non_Zerored

This commit is contained in:
gingerBill
2022-09-22 12:12:57 +01:00
parent eb0d7465e2
commit 7f601c9535
21 changed files with 128 additions and 65 deletions
+4
View File
@@ -69,6 +69,10 @@ alloc_bytes :: proc(size: int, alignment: int = DEFAULT_ALIGNMENT, allocator :=
return runtime.mem_alloc(size, alignment, allocator, loc)
}
alloc_bytes_non_zerored :: proc(size: int, alignment: int = DEFAULT_ALIGNMENT, allocator := context.allocator, loc := #caller_location) -> ([]byte, Allocator_Error) {
return runtime.mem_alloc_non_zeroed(size, alignment, allocator, loc)
}
free :: proc(ptr: rawptr, allocator := context.allocator, loc := #caller_location) -> Allocator_Error {
return runtime.mem_free(ptr, allocator, loc)
}