mirror of https://github.com/mkerrisk/man-pages
mmap.2: Minor tweaks to Jan Kara's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
b138773b1e
commit
79da08c844
31
man2/mmap.2
31
man2/mmap.2
|
@ -127,19 +127,21 @@ to the underlying file requires the use of
|
||||||
.BR msync (2).)
|
.BR msync (2).)
|
||||||
.TP
|
.TP
|
||||||
.BR MAP_SHARED_VALIDATE " (since Linux 4.15)"
|
.BR MAP_SHARED_VALIDATE " (since Linux 4.15)"
|
||||||
The same as
|
This flag provides the same behavior as
|
||||||
.B MAP_SHARED
|
.B MAP_SHARED
|
||||||
except that
|
except that
|
||||||
.B MAP_SHARED
|
.B MAP_SHARED
|
||||||
mappings ignore unknown flags in
|
mappings ignore unknown flags in
|
||||||
.IR flags .
|
.IR flags .
|
||||||
In contrast when creating mapping of
|
By contrast, when creating a mapping using
|
||||||
.B MAP_SHARED_VALIDATE
|
.B MAP_SHARED_VALIDATE ,
|
||||||
mapping type, the kernel verifies all passed flags are known and fails the
|
the kernel verifies all passed flags are known and fails the
|
||||||
mapping with
|
mapping with the error
|
||||||
.BR EOPNOTSUPP
|
.BR EOPNOTSUPP
|
||||||
otherwise.
|
for unknown flags.
|
||||||
This mapping type is also required to be able to use some mapping flags.
|
This mapping type is also required to be able to use some mapping flags
|
||||||
|
(e.g.,
|
||||||
|
.BR MAP_SYNC ).
|
||||||
.TP
|
.TP
|
||||||
.B MAP_PRIVATE
|
.B MAP_PRIVATE
|
||||||
Create a private copy-on-write mapping.
|
Create a private copy-on-write mapping.
|
||||||
|
@ -155,6 +157,8 @@ Both
|
||||||
and
|
and
|
||||||
.B MAP_PRIVATE
|
.B MAP_PRIVATE
|
||||||
are described in POSIX.1-2001 and POSIX.1-2008.
|
are described in POSIX.1-2001 and POSIX.1-2008.
|
||||||
|
.B MAP_SHARED_VALIDATE
|
||||||
|
is a Linux extension.
|
||||||
.PP
|
.PP
|
||||||
In addition, zero or more of the following values can be ORed in
|
In addition, zero or more of the following values can be ORed in
|
||||||
.IR flags :
|
.IR flags :
|
||||||
|
@ -432,19 +436,20 @@ support can later be transparently implemented for glibc.
|
||||||
.\" context switch optimization?"
|
.\" context switch optimization?"
|
||||||
.TP
|
.TP
|
||||||
.BR MAP_SYNC " (since Linux 4.15)"
|
.BR MAP_SYNC " (since Linux 4.15)"
|
||||||
This flags is available only with
|
This flag is available only with the
|
||||||
.B MAP_SHARED_VALIDATE
|
.B MAP_SHARED_VALIDATE
|
||||||
mapping type.
|
mapping type;
|
||||||
Mappings of
|
mappings of type
|
||||||
.B MAP_SHARED
|
.B MAP_SHARED
|
||||||
type will silently ignore this flag.
|
will silently ignore this flag.
|
||||||
This flag is supported only for files supporting DAX
|
This flag is supported only for files supporting DAX
|
||||||
(direct mapping of persistent memory).
|
(direct mapping of persistent memory).
|
||||||
For other files, creating mapping with this flag results in
|
For other files, creating a mapping with this flag results in an
|
||||||
.B EOPNOTSUPP
|
.B EOPNOTSUPP
|
||||||
error.
|
error.
|
||||||
|
.IP
|
||||||
Shared file mappings with this flag provide the guarantee that while
|
Shared file mappings with this flag provide the guarantee that while
|
||||||
some memory is writeably mapped in the address space of the process,
|
some memory is writably mapped in the address space of the process,
|
||||||
it will be visible in the same file at the same offset even after
|
it will be visible in the same file at the same offset even after
|
||||||
the system crashes or is rebooted.
|
the system crashes or is rebooted.
|
||||||
This allows users of such mappings to make data modifications
|
This allows users of such mappings to make data modifications
|
||||||
|
|
Loading…
Reference in New Issue