Allocates memory for an array of objects.
#include <xmalloc.h>
void *xcalloc (
size_t n,
size_t size);
(IN) Specifies the number of objects.
(IN) Specifies the size (in bytes) of each object.
Returns a pointer to the start of the allocated memory. If insufficient memory is available, exits and writes a “no memory available” message on stderr. If the value of the size parameter is 0, returns a pointer to one byte of memory.
The xcalloc function calls the calloc function which initializes all the memory to binary zeroes.
A block of memory allocated using the xcalloc function should be freed using the xfree function.