boot: Add calloc() implementation to bootloader heap.
Needed by zstd.
This commit is contained in:
@@ -548,6 +548,17 @@ realloc(void* oldBuffer, size_t newSize)
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
calloc(size_t numElements, size_t size)
|
||||
{
|
||||
void* address = malloc(numElements * size);
|
||||
if (address != NULL)
|
||||
memset(address, 0, numElements * size);
|
||||
|
||||
return address;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
free(void* allocated)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user