1FREE(P)                    POSIX Programmer's Manual                   FREE(P)
2
3
4

NAME

6       free - free allocated memory
7

SYNOPSIS

9       #include <stdlib.h>
10
11       void free(void *ptr);
12
13

DESCRIPTION

15       The free() function shall cause the space pointed to by ptr to be deal‐
16       located; that is, made available for further allocation. If  ptr  is  a
17       null  pointer,  no action shall occur.  Otherwise, if the argument does
18       not match  a  pointer  earlier  returned  by  the  calloc(),  malloc(),
19       posix_memalign(),   realloc(), or   strdup()  function, or if the space
20       has been deallocated by a call to free() or realloc(), the behavior  is
21       undefined.
22
23       Any  use  of  a pointer that refers to freed space results in undefined
24       behavior.
25

RETURN VALUE

27       The free() function shall not return a value.
28

ERRORS

30       No errors are defined.
31
32       The following sections are informative.
33

EXAMPLES

35       None.
36

APPLICATION USAGE

38       There is now no requirement  for  the  implementation  to  support  the
39       inclusion of <malloc.h>.
40

RATIONALE

42       None.
43

FUTURE DIRECTIONS

45       None.
46

SEE ALSO

48       calloc()  ,  malloc()  ,  realloc()  ,  the  Base Definitions volume of
49       IEEE Std 1003.1-2001, <stdlib.h>
50
52       Portions of this text are reprinted and reproduced in  electronic  form
53       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
54       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
55       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
56       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
57       event of any discrepancy between this version and the original IEEE and
58       The Open Group Standard, the original IEEE and The Open Group  Standard
59       is  the  referee document. The original Standard can be obtained online
60       at http://www.opengroup.org/unix/online.html .
61
62
63
64IEEE/The Open Group                  2003                              FREE(P)
Impressum