Malloc
Free
Calloc
memory allocation
char *malloc
unsigned size
free
char *ptr
char *calloc
unsignednel
unsignedelsize
Description
Malloc returns a pointer to a block of at least "size" free bytes.
Free requires a pointer to a block that has been allocated by
malloc; it frees the space to be allocated again.
Calloc allocates space for an array. Nel is the number of
elements in the arrary, and elsize is the size of each element.
Calloc initializes the space to zero.
Diagnostics
Malloc, free, and calloc return NULL(0) if no free memory can
be found or if there was an error.