runtime_loader: Add calloc() to heap implementation.
Taken from the bootloader's version, which this heap is based on.
This commit is contained in:
@@ -412,6 +412,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
|
void
|
||||||
free(void* allocated)
|
free(void* allocated)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user