malloc() - general memory allocation function
#include <stdlib.h>
void * malloc (size_t size)
The malloc(3) function allocates uninitialized space for an object whose size is specified by size. The malloc(3) function maintains multiple lists of free blocks according to size, allocating space from the appropriate list.
On INTERIX, each call to malloc(0) returns a different value.
Upon successful completion with size not equal to 0, malloc() returns a pointer to the allocated space. If size is 0, either a null pointer or a unique pointer that can be successfully passed to free(3) will be returned. Otherwise, it returns a null pointer and sets errno to indicate the error.
The malloc() function will fail if:
calloc(3)
free(3)
realloc(3)