mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 23:58:50 +00:00
Add Allocator_Mode.Alloc_Non_Zerored
This commit is contained in:
Vendored
+1
-1
@@ -1564,7 +1564,7 @@ MemAllocatorProc :: proc(allocator_data: rawptr, mode: mem.Allocator_Mode,
|
||||
size, alignment: int,
|
||||
old_memory: rawptr, old_size: int, location := #caller_location) -> (data: []byte, err: mem.Allocator_Error) {
|
||||
switch mode {
|
||||
case .Alloc:
|
||||
case .Alloc, .Alloc_Non_Zeroed:
|
||||
ptr := MemAlloc(c.int(size))
|
||||
if ptr == nil {
|
||||
err = .Out_Of_Memory
|
||||
|
||||
Reference in New Issue
Block a user