summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormillert <>2007-09-03 21:38:34 +0000
committermillert <>2007-09-03 21:38:34 +0000
commit4021cf58e3f5c5243f526ffd1336767dfe8458f2 (patch)
treeee7a6cb6e54acb047869138f4c74faf03c6bf813
parent5bcc2c737c02ba15c72017d1245c3b8403f689ea (diff)
downloadopenbsd-4021cf58e3f5c5243f526ffd1336767dfe8458f2.tar.gz
openbsd-4021cf58e3f5c5243f526ffd1336767dfe8458f2.tar.bz2
openbsd-4021cf58e3f5c5243f526ffd1336767dfe8458f2.zip
Update free(3) section--we use mmap()/munmap(), not brk().
Based on a diff from Mike Belopuhov. OK jmc@
-rw-r--r--src/lib/libc/stdlib/malloc.310
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/libc/stdlib/malloc.3 b/src/lib/libc/stdlib/malloc.3
index 4c5ea84c08..f74a55287b 100644
--- a/src/lib/libc/stdlib/malloc.3
+++ b/src/lib/libc/stdlib/malloc.3
@@ -30,7 +30,7 @@
30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31.\" SUCH DAMAGE. 31.\" SUCH DAMAGE.
32.\" 32.\"
33.\" $OpenBSD: malloc.3,v 1.48 2007/09/03 14:37:02 millert Exp $ 33.\" $OpenBSD: malloc.3,v 1.49 2007/09/03 21:38:34 millert Exp $
34.\" 34.\"
35.Dd $Mdocdate: September 3 2007 $ 35.Dd $Mdocdate: September 3 2007 $
36.Dt MALLOC 3 36.Dt MALLOC 3
@@ -125,9 +125,9 @@ The
125.Fn free 125.Fn free
126function causes the space pointed to by 126function causes the space pointed to by
127.Fa ptr 127.Fa ptr
128to be deallocated, that is, at least made available for further allocation, 128to be either placed on a list of free pages to make it available for future
129but if possible, it will be passed back to the kernel with 129allocation or, if required, to be returned to the kernel using
130.Xr sbrk 2 . 130.Xr munmap 2 .
131If 131If
132.Fa ptr 132.Fa ptr
133is a null pointer, no action occurs. 133is a null pointer, no action occurs.
@@ -449,6 +449,8 @@ We found something we didn't understand.
449.El 449.El
450.Sh SEE ALSO 450.Sh SEE ALSO
451.Xr brk 2 , 451.Xr brk 2 ,
452.Xr mmap 2 ,
453.Xr munmap 2 ,
452.Xr alloca 3 , 454.Xr alloca 3 ,
453.Xr getpagesize 3 455.Xr getpagesize 3
454.Sh STANDARDS 456.Sh STANDARDS