calloc()

This is a Hardware-specific function. It is not implemented in the Compiler.

Syntax
  #include <stdlib.h>

  
  void *calloc(size_t n, size_t size);

  
Description

calloc() allocates a block of memory for an array containing n elements of size size. All bytes in the memory block are initialized to zero. To deallocate the block, use free(). Do not use the default implementation in interrupt routines because it is not reentrant.

Return

calloc() returns a pointer to the allocated memory block. If the block cannot be allocated, the return value is NULL.

See also

malloc() and

realloc()