Everything

calloc


Allocates a storage area and clears all bits in the allocated storage area to 0.

[Format]

#include <stdlib.h>

void *calloc (size_t nelem, size_t elsize);

[Parameters]

nelem Number of elements

elsize Number of bytes occupied by a single element

[Return values]

Normal: Starting address of an allocated storage area

Abnormal: Storage allocation failed, or either of the parameter is 0: NULL

[Remarks]

The calloc function allocates as many storage units of size elsize (bytes) as the number specified by nelem. The function also clears all the bits in the allocated storage area to 0.

The CC-RX has a security facility for detecting illegal operations to storage areas. For details, refer to the -secure_malloc option in "2.5.4 Library Generator Options".