diff options
| author | cgd <cgd@NetBSD.org> | 1995-02-27 12:31:34 +0000 |
|---|---|---|
| committer | cgd <cgd@NetBSD.org> | 1995-02-27 12:31:34 +0000 |
| commit | 4eab61bd40c07b2fc612ad50cface2b77fc110d0 (patch) | |
| tree | 7118747f1d9919499fdea5d7c6908c5cfe04e5a8 /lib/libc/sys/munmap.2 | |
| parent | c67e54a2e2b9f3d455a30d68ea4e09e56d7b9136 (diff) | |
merge with lite, keeping most local changes. clean up Ids
Diffstat (limited to 'lib/libc/sys/munmap.2')
| -rw-r--r-- | lib/libc/sys/munmap.2 | 51 |
1 files changed, 39 insertions, 12 deletions
diff --git a/lib/libc/sys/munmap.2 b/lib/libc/sys/munmap.2 index f4659a13c72..ab097b704cf 100644 --- a/lib/libc/sys/munmap.2 +++ b/lib/libc/sys/munmap.2 @@ -1,5 +1,7 @@ -.\" Copyright (c) 1991 Regents of the University of California. -.\" All rights reserved. +.\" $NetBSD: munmap.2,v 1.5 1995/02/27 12:35:03 cgd Exp $ +.\" +.\" Copyright (c) 1991, 1993 +.\" The Regents of the University of California. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -29,10 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" from: @(#)munmap.2 6.1 (Berkeley) 5/27/91 -.\" $Id: munmap.2,v 1.4 1993/12/15 18:08:18 jtc Exp $ +.\" @(#)munmap.2 8.2 (Berkeley) 4/15/94 .\" -.Dd May 27, 1991 +.Dd April 15, 1994 .Dt MUNMAP 2 .Os .Sh NAME @@ -42,15 +43,41 @@ .Fd #include <sys/types.h> .Fd #include <sys/mman.h> .Ft int -.Fn munmap "caddr_t addr" "int len" +.Fn munmap "caddr_t addr" "size_t len" .Sh DESCRIPTION -The +The .Fn munmap -system call deletes the mappings for the specified address range, +system call +deletes the mappings for the specified address range, and causes further references to addresses within the range to generate invalid memory references. -.Sh SEE ALSO -.Xr madvise 2 , -.Xr mincore 2 , +.Sh RETURN VALUES +Upon successful completion, +.Nm munmap +returns zero. +Otherwise, a value of -1 is returned and +.Va errno +is set to indicate the error. +.Sh ERRORS +.Fn Munmap +will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa addr +parameter was not page aligned, the +.Fa len +parameter was negative, or +some part of the region being unmapped is not part of the currently +valid address space. +.Sh "SEE ALSO" +.Xr getpagesize 3 , +.Xr msync 2 , +.Xr munmap 2 , .Xr mprotect 2 , -.Xr msync 2 +.Xr madvise 2 , +.Xr mincore 2 +.Sh HISTORY +The +.Fn munmap +function first appeared in 4.4BSD. |
