Implementation status: partially implemented


#include <stdlib.h>

void *calloc(size_t nitems, size_t size);


The function allocates memory.

nitems - a number of items to allocate,
size - an item size.

The function allocates nitems of size bytes of memory and returns a pointer to the allocated memory. The allocated memory is aligned such that it can be used for any data type, including AltiVec- and SSE-related types. The allocated memory is filled with bytes of value zero.

Return value

The allocated memory address on success, NULL otherwise.


[ENOMEM] - insufficient memory is available.