Merge pull request #1376 from jasonKercher/master
Added zeroing to new memory regions from _unix_realloc
This commit is contained in:
4 files changed
+16
-2
No files matched your search
@@ -553,6 +553,8 @@ heap_alloc :: proc(size: int) -> rawptr {
|
||||
return _unix_calloc(1, size)
|
||||
}
|
||||
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, new_size)
|
||||
}
|
||||
heap_free :: proc(ptr: rawptr) {
|
||||
|
||||
Reference in new issue
Block a user