1*48913Scael.\" Copyright (c) 1991 The Regents of the University of California. 2*48913Scael.\" All rights reserved. 3*48913Scael.\" 4*48913Scael.\" %sccs.include.redist.man% 5*48913Scael.\" 6*48913Scael.\" @(#)free.3 5.1 (Berkeley) 05/02/91 7*48913Scael.\" 8*48913Scael.Dd 9*48913Scael.Dt FREE 3 10*48913Scael.Os 11*48913Scael.Sh NAME 12*48913Scael.Nm free 13*48913Scael.Nd free up memory allocated with malloc, calloc or realloc 14*48913Scael.Sh SYNOPSIS 15*48913Scael.Fd #include <stdlib.h> 16*48913Scael.Ft void 17*48913Scael.Fn free "void *ptr" 18*48913Scael.Sh DESCRIPTION 19*48913ScaelThe 20*48913Scael.Fn free 21*48913Scaelfunction causes the space pointed to by 22*48913Scael.Fa ptr 23*48913Scaelto be deallocated, that is, made available 24*48913Scaelfor further allocation. 25*48913ScaelIf 26*48913Scael.Fa ptr 27*48913Scaelis a null pointer, no action occurs. 28*48913ScaelOtherwise, if the argument does not match a pointer earlier 29*48913Scaelreturned by the 30*48913Scael.Xr calloc , 31*48913Scael.Xr malloc , 32*48913Scaelor 33*48913Scael.Xr realloc 34*48913Scaelfunction, or if the space has been deallocated by a call to 35*48913Scael.Fn free 36*48913Scaelor 37*48913Scael.Xr realloc , 38*48913Scaelgeneral havoc may occur. 39*48913Scael.Sh RETURN VALUES 40*48913ScaelThe 41*48913Scael.Fn free 42*48913Scaelfunction returns no value. 43*48913Scael.Sh SEE ALSO 44*48913Scael.Xr calloc 3 , 45*48913Scael.Xr malloc 3 , 46*48913Scael.Xr realloc 3 47*48913Scael.Sh STANDARDS 48*48913ScaelThe 49*48913Scael.Fn free 50*48913Scaelfunction conforms to 51*48913Scael.St -ansiC . 52