diff options
author | 2007-09-03 21:38:34 +0000 | |
---|---|---|
committer | 2007-09-03 21:38:34 +0000 | |
commit | ae95e07c8a00a989d56218f626d618cb10a6cc25 (patch) | |
tree | 7e8a72ff0bd8d0607532e258fd7d8f220cdd9704 /lib/libc/stdlib/malloc.3 | |
parent | move back to using malloc() instead of calloc(), because the yacc (diff) | |
download | wireguard-openbsd-ae95e07c8a00a989d56218f626d618cb10a6cc25.tar.xz wireguard-openbsd-ae95e07c8a00a989d56218f626d618cb10a6cc25.zip |
Update free(3) section--we use mmap()/munmap(), not brk().
Based on a diff from Mike Belopuhov. OK jmc@
Diffstat (limited to 'lib/libc/stdlib/malloc.3')
-rw-r--r-- | lib/libc/stdlib/malloc.3 | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3 index 4c5ea84c08c..f74a55287bf 100644 --- a/lib/libc/stdlib/malloc.3 +++ b/lib/libc/stdlib/malloc.3 @@ -30,7 +30,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: malloc.3,v 1.48 2007/09/03 14:37:02 millert Exp $ +.\" $OpenBSD: malloc.3,v 1.49 2007/09/03 21:38:34 millert Exp $ .\" .Dd $Mdocdate: September 3 2007 $ .Dt MALLOC 3 @@ -125,9 +125,9 @@ The .Fn free function causes the space pointed to by .Fa ptr -to be deallocated, that is, at least made available for further allocation, -but if possible, it will be passed back to the kernel with -.Xr sbrk 2 . +to be either placed on a list of free pages to make it available for future +allocation or, if required, to be returned to the kernel using +.Xr munmap 2 . If .Fa ptr is a null pointer, no action occurs. @@ -449,6 +449,8 @@ We found something we didn't understand. .El .Sh SEE ALSO .Xr brk 2 , +.Xr mmap 2 , +.Xr munmap 2 , .Xr alloca 3 , .Xr getpagesize 3 .Sh STANDARDS |