The order and contiguity of storage allocated by calloc, malloc, and realloc functions is not specified.
#include <stdlib.h>
void *calloc
(size_t nmemb , size_t
size );
The calloc function allocates space for an array of nmemb objects, each of whose size is size. The space is initialized to all bits zero.
The calloc function returns either a null pointer or a pointer to the allocated space.
The pointer returned is always 8-byte aligned so that objects of type double may be assigned.
#include <stdlib.h>
void
free
(void * ptr
);
The free function causes the space pointed to by ptr to be deallocated that is, made available for further allocation.
The free function returns no value.
None.
#include <stdlib.h>
void *malloc
(size_t size );
The malloc function allocates space for an object whose size is specified by size and whose value is indeterminate
The malloc function returns either a null pointer o a pointer to the allocated space.
The pointer returned is always 8-byte aligned so that objects of type double may be assigned.
#include <stdlib.h>
void *realloc
(void * ptr , size_t
size );
The realloc function allocates space for an object whose size is specified by size and whose value is indeterminate
The realloc function returns either a null pointer o a pointer to the allocated space.
The pointer returned is always 8-byte aligned so that objects of type double may be assigned.