logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

free.3p (2673B)


  1. '\" et
  2. .TH FREE "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. free
  12. \(em free allocated memory
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <stdlib.h>
  17. .P
  18. void free(void *\fIptr\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. The functionality described on this reference page is aligned with the
  22. ISO\ C standard. Any conflict between the requirements described here and the
  23. ISO\ C standard is unintentional. This volume of POSIX.1\(hy2017 defers to the ISO\ C standard.
  24. .P
  25. The
  26. \fIfree\fR()
  27. function shall cause the space pointed to by
  28. .IR ptr
  29. to be deallocated; that is, made available for further allocation. If
  30. .IR ptr
  31. is a null pointer, no action shall occur. Otherwise, if the argument
  32. does not match a pointer earlier returned by a function in POSIX.1\(hy2008 that
  33. allocates memory as if by
  34. \fImalloc\fR(),
  35. or if the space has been deallocated by a call to
  36. \fIfree\fR()
  37. or
  38. \fIrealloc\fR(),
  39. the behavior is undefined.
  40. .P
  41. Any use of a pointer that refers to freed space results in undefined
  42. behavior.
  43. .SH "RETURN VALUE"
  44. The
  45. \fIfree\fR()
  46. function shall not return a value.
  47. .SH ERRORS
  48. No errors are defined.
  49. .LP
  50. .IR "The following sections are informative."
  51. .SH EXAMPLES
  52. None.
  53. .SH "APPLICATION USAGE"
  54. There is now no requirement for the implementation to support the
  55. inclusion of
  56. .IR <malloc.h> .
  57. .SH RATIONALE
  58. None.
  59. .SH "FUTURE DIRECTIONS"
  60. None.
  61. .SH "SEE ALSO"
  62. .IR "\fIcalloc\fR\^(\|)",
  63. .IR "\fImalloc\fR\^(\|)",
  64. .IR "\fIposix_memalign\fR\^(\|)",
  65. .IR "\fIrealloc\fR\^(\|)"
  66. .P
  67. The Base Definitions volume of POSIX.1\(hy2017,
  68. .IR "\fB<stdlib.h>\fP"
  69. .\"
  70. .SH COPYRIGHT
  71. Portions of this text are reprinted and reproduced in electronic form
  72. from IEEE Std 1003.1-2017, Standard for Information Technology
  73. -- Portable Operating System Interface (POSIX), The Open Group Base
  74. Specifications Issue 7, 2018 Edition,
  75. Copyright (C) 2018 by the Institute of
  76. Electrical and Electronics Engineers, Inc and The Open Group.
  77. In the event of any discrepancy between this version and the original IEEE and
  78. The Open Group Standard, the original IEEE and The Open Group Standard
  79. is the referee document. The original Standard can be obtained online at
  80. http://www.opengroup.org/unix/online.html .
  81. .PP
  82. Any typographical or formatting errors that appear
  83. in this page are most likely
  84. to have been introduced during the conversion of the source files to
  85. man page format. To report such errors, see
  86. https://www.kernel.org/doc/man-pages/reporting_bugs.html .