diff options
Diffstat (limited to 'man2/mmap.2')
-rw-r--r-- | man2/mmap.2 | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/man2/mmap.2 b/man2/mmap.2 index 136b45876..d9a6e5813 100644 --- a/man2/mmap.2 +++ b/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 2020-08-13 "Linux" "Linux Programmer's Manual" +.TH MMAP 2 2020-12-21 "Linux" "Linux Programmer's Manual" .SH NAME mmap, munmap \- map or unmap files or devices into memory .SH SYNOPSIS @@ -635,9 +635,11 @@ Use of a mapped region can result in these signals: Attempted write into a region mapped as read-only. .TP .B SIGBUS -Attempted access to a portion of the buffer that does not correspond -to the file (for example, beyond the end of the file, including the -case where another process has truncated the file). +Attempted access to a page of the buffer that lies beyond the +end of the mapped file. +For an explanation of the treatment of the bytes in the page that +corresponds to the end of a mapped file that is not a multiple +of the page size, see NOTES. .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -678,8 +680,10 @@ 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. +a multiple of the page size, +the remaining bytes in the partial page at the end of the mapping +are zeroed when mapped, +and modifications 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. @@ -839,7 +843,7 @@ to be a multiple of the underlying huge page size. .PP For .BR munmap (), -.I addr +.IR addr , and .I length must both be a multiple of the underlying huge page size. @@ -1016,7 +1020,7 @@ B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128\(en129 and 389\(en391. .\" 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 5.09 of the Linux +This page is part of release 5.10 of the Linux .I man-pages project. A description of the project, |