NAME
free — free
allocated memory
SYNOPSIS
#include <stdlib.h> void free(void *ptr);
DESCRIPTION
The free() function causes the space pointed to by ptr to be deallocated; that is, made available for further allocation. If ptr is a null pointer, no action occurs. Otherwise, if the argument does not match a pointer earlier returned by the calloc(3) , malloc(3) , realloc(3) or valloc(3) function, or if the space is deallocated by a call to free() or realloc(3) , the behaviour is undefined.
Any use of a pointer that refers to freed space causes undefined behaviour.
RETURN VALUE
The free() function returns no value.
ERRORS
No errors are defined.
EXAMPLES
None.
APPLICATION USAGE
There is now no requirement for the implementation to support the inclusion of <malloc.h> .
FUTURE DIRECTIONS
None.
SEE ALSO
calloc(3) , malloc(3) , realloc(3) , <stdlib.h> .
DERIVATION
Derived from Issue 1 of the SVID.