mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-30 03:10:06 +00:00
Merge pull request #1376 from jasonKercher/master
Added zeroing to new memory regions from _unix_realloc
This commit is contained in:
@@ -727,6 +727,8 @@ heap_alloc :: proc(size: int) -> rawptr {
|
||||
}
|
||||
|
||||
heap_resize :: proc(ptr: rawptr, new_size: int) -> rawptr {
|
||||
// NOTE: _unix_realloc doesn't guarantee new memory will be zeroed on
|
||||
// POSIX platforms. Ensure your caller takes this into account.
|
||||
return _unix_realloc(ptr, c.size_t(new_size))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user