malloc

free

#include <stdlib.h>void free(void *ptr);

The free( ) function returns the memory pointed to by ptr to the heap. This makes the memory available for future allocation.

It is imperative that free( ) only be called with a pointer that was previously allocated using one of the dynamic allocation system’s functions. Attempting to free an invalid pointer will most likely destroy the memory management mechanism and possibly cause a system crash. If you pass a null pointer, free( ) performs no operation.

Related functions are calloc( ), malloc( ), and realloc( ).




C(s)C++ Programmer's Reference
C Programming on the IBM PC (C Programmers Reference Guide Series)
ISBN: 0673462897
EAN: 2147483647
Year: 2002
Pages: 539

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net