mirror of https://github.com/mkerrisk/man-pages
mlock.2: Minor tweaks to Eric Munson's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
a0c1a1ef95
commit
d357d179c9
28
man2/mlock.2
28
man2/mlock.2
|
@ -65,6 +65,9 @@ guaranteed to be resident in RAM when the call returns successfully;
|
|||
the pages are guaranteed to stay in RAM until later unlocked.
|
||||
|
||||
.BR mlock2 ()
|
||||
.\" commit a8ca5d0ecbdde5cc3d7accacbd69968b0c98764e
|
||||
.\" commit de60f5f10c58d4f34b68622442c0e04180367f3f
|
||||
.\" commit b0f205c2a3082dd9081f9a94e50658c5fa906ff1
|
||||
also locks pages in the specified range starting at
|
||||
.I addr
|
||||
and continuing for
|
||||
|
@ -78,7 +81,7 @@ argument.
|
|||
The
|
||||
.I flags
|
||||
argument can be either 0 or the following constant:
|
||||
.TP 1.2i
|
||||
.TP
|
||||
.B MLOCK_ONFAULT
|
||||
Lock pages that are currently resident and mark the entire range to have
|
||||
pages locked when they are populated by the page fault.
|
||||
|
@ -88,14 +91,13 @@ If
|
|||
.I flags
|
||||
is 0,
|
||||
.BR mlock2 ()
|
||||
will function exactly as
|
||||
.BR mlock ()
|
||||
would.
|
||||
behaves exactly the same as
|
||||
.BR mlock ().
|
||||
|
||||
Note: Currently, there is not a glibc wrapper for
|
||||
.BR mlock2 ()
|
||||
Note: currently, there is not a glibc wrapper for
|
||||
.BR mlock2 (),
|
||||
so it will need to be invoked using
|
||||
.BR syscall (2)
|
||||
.BR syscall (2).
|
||||
|
||||
.BR munlock ()
|
||||
unlocks pages in the address range starting at
|
||||
|
@ -266,6 +268,9 @@ For
|
|||
.B EPERM
|
||||
(Linux 2.6.8 and earlier) The caller was not privileged
|
||||
.RB ( CAP_IPC_LOCK ).
|
||||
.SH VERSIONS
|
||||
.BR mlock2 (2)
|
||||
is available since Linux 4.4.
|
||||
.SH CONFORMING TO
|
||||
POSIX.1-2001, POSIX.1-2008, SVr4.
|
||||
.SH AVAILABILITY
|
||||
|
@ -375,7 +380,11 @@ and
|
|||
automatically round
|
||||
.I addr
|
||||
down to the nearest page boundary.
|
||||
However, POSIX.1 allows an implementation to require that
|
||||
However, the POSIX.1 specification of
|
||||
.BR mlock ()
|
||||
and
|
||||
.BR munlock ()
|
||||
allows an implementation to require that
|
||||
.I addr
|
||||
is page aligned, so portable applications should ensure this.
|
||||
|
||||
|
@ -430,9 +439,6 @@ resource limit is encountered.
|
|||
.\" http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
|
||||
.\" "Rationale for RLIMIT_MEMLOCK"
|
||||
.\" 23 Jan 2006
|
||||
.SH VERSIONS
|
||||
.BR mlock2 (2)
|
||||
is available since Linux 4.4.
|
||||
.SH SEE ALSO
|
||||
.BR mmap (2),
|
||||
.BR setrlimit (2),
|
||||
|
|
Loading…
Reference in New Issue