fix calloc not returned zeroed-out memory

This commit is contained in:
bumbread 2023-02-19 02:04:44 +11:00
parent a04353a63c
commit 601c4cc6c9
1 changed files with 1 additions and 0 deletions

View File

@ -64,6 +64,7 @@ void *_mem_alloc(size_t alignment, size_t size) {
// memory buffer according to required alignment.
size_t block_size = _mem_min_block_size(alignment, size);
void *block_start = HeapAlloc(heap_handle, 0, block_size);
memset(block_start, 0, block_size);
if(block_start == NULL) {
return NULL;
}