HP 3000 Manuals

free [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation


HP C/iX Library Reference Manual

free 

Frees a block of allocated memory.

Syntax 

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

Parameters 

ptr           A pointer to a block of memory previously allocated by a
              call to calloc(), malloc(), or realloc().

Return Values 

None.

Description 

The free function frees the block of memory pointed to by ptr, making the
space available for further allocation.  The contents of the block are
destroyed.  The argument to free() is a pointer to a block previously
allocated by calloc(), malloc(), or realloc().

The malloc and free functions provide a simple generalized memory
allocation package.

Undefined results occur if some random pointer is handed to free().

See Also 

calloc(), malloc(), realloc(), ANSI C 4.10.3.2, POSIX.1 8.1



MPE/iX 5.0 Documentation