X-Git-Url: http://git.osdn.net/view?p=linuxjm%2FLDP_man-pages.git;a=blobdiff_plain;f=original%2Fman2%2Fmmap.2;h=dbda22b930f0abc469421dc4a4c1b9c8a2ebc91e;hp=4c024b6606dda540b8da3a9224dd8d570f1a17c9;hb=4ea6bb24817f6f049d6bbc90ecd77a869876f9b0;hpb=78d692a91a29bb279b5fc6a6294ff3e418a184c8 diff --git a/original/man2/mmap.2 b/original/man2/mmap.2 index 4c024b66..dbda22b9 100644 --- a/original/man2/mmap.2 +++ b/original/man2/mmap.2 @@ -37,7 +37,7 @@ .\" 2007-07-10, mtk, Added an example program. .\" 2008-11-18, mtk, document MAP_STACK .\" -.TH MMAP 2 2014-04-06 "Linux" "Linux Programmer's Manual" +.TH MMAP 2 2015-01-22 "Linux" "Linux Programmer's Manual" .SH NAME mmap, munmap \- map or unmap files or devices into memory .SH SYNOPSIS @@ -465,6 +465,10 @@ but the mapped area belongs to a file on a filesystem that was mounted no-exec. .\" (Since 2.4.25 / 2.6.0.) .TP +.B EPERM +The operation was prevented by a file seal; see +.BR fcntl (2). +.TP .B ETXTBSY .B MAP_DENYWRITE was set but the object specified by @@ -499,7 +503,7 @@ SVr4, 4.4BSD, POSIX.1-2001. .SH AVAILABILITY On POSIX systems on which .BR mmap (), -.BR msync (2) +.BR msync (2), and .BR munmap () are available, @@ -511,21 +515,6 @@ is defined in \fI\fP to a value greater than 0. .\" -1: unavailable, 0: ask using sysconf(). .\" glibc defines it to 1. .SH NOTES -This page describes the interface provided by the glibc -.BR mmap () -wrapper function. -Originally, this function invoked a system call of the same name. -Since kernel 2.4, that system call has been superseded by -.BR mmap2 (2), -and nowadays -.\" Since around glibc 2.1/2.2, depending on the platform. -the glibc -.BR mmap () -wrapper function invokes -.BR mmap2 (2) -with a suitably adjusted value for -.IR offset . - On some hardware architectures (e.g., i386), .B PROT_WRITE implies @@ -582,6 +571,22 @@ The relevant flags are: .BR MAP_POPULATE , and .BR MAP_STACK . +.\" +.SS C library/kernel ABI differences +This page describes the interface provided by the glibc +.BR mmap () +wrapper function. +Originally, this function invoked a system call of the same name. +Since kernel 2.4, that system call has been superseded by +.BR mmap2 (2), +and nowadays +.\" Since around glibc 2.1/2.2, depending on the platform. +the glibc +.BR mmap () +wrapper function invokes +.BR mmap2 (2) +with a suitably adjusted value for +.IR offset . .SH BUGS On Linux there are no guarantees like those suggested above under .BR MAP_NORESERVE . @@ -709,6 +714,7 @@ main(int argc, char *argv[]) .fi .SH SEE ALSO .BR getpagesize (2), +.BR memfd_create (2), .BR mincore (2), .BR mlock (2), .BR mmap2 (2), @@ -733,10 +739,11 @@ B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391. .\" Repeat after me: private read-only mappings are 100% equivalent to .\" shared read-only mappings. No ifs, buts, or maybes. -- Linus .SH COLOPHON -This page is part of release 3.64 of the Linux +This page is part of release 3.79 of the Linux .I man-pages project. A description of the project, -and information about reporting bugs, +information about reporting bugs, +and the latest version of this page, can be found at \%http://www.kernel.org/doc/man\-pages/.