mmap.2: Move some text hidden at the end of DESCRIPTION to NOTES

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2020-02-22 22:47:56 +01:00
parent 8762c93c83
commit dd6ceee6f7
1 changed files with 15 additions and 14 deletions

View File

@ -462,20 +462,6 @@ However, most systems also support
.\" POSIX may add MAP_ANON in the future
.\" http://austingroupbugs.net/tag_view_page.php?tag_id=8
.\" http://austingroupbugs.net/view.php?id=850
.PP
Memory mapped by
.BR mmap ()
is preserved across
.BR fork (2),
with the same attributes.
.PP
A file is mapped in multiples of the page size.
For a file that is not
a multiple of the page size, the remaining memory is zeroed when mapped,
and writes to that region are not written out to the file.
The effect of
changing the size of the underlying file of a mapping on the pages that
correspond to added or removed regions of the file is unspecified.
.SS munmap()
The
.BR munmap ()
@ -681,6 +667,21 @@ is defined in \fI<unistd.h>\fP to a value greater than 0.
.\" -1: unavailable, 0: ask using sysconf().
.\" glibc defines it to 1.
.SH NOTES
.PP
Memory mapped by
.BR mmap ()
is preserved across
.BR fork (2),
with the same attributes.
.PP
A file is mapped in multiples of the page size.
For a file that is not
a multiple of the page size, the remaining memory is zeroed when mapped,
and writes to that region are not written out to the file.
The effect of
changing the size of the underlying file of a mapping on the pages that
correspond to added or removed regions of the file is unspecified.
.PP
On some hardware architectures (e.g., i386),
.B PROT_WRITE
implies