mirror of https://github.com/mkerrisk/man-pages
mlock.2: Explain purpose of mlock() MLOCK_ONFAULT and mlockall() MCL_ONFAULT
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
9f1eb9e08d
commit
f97c12d18b
11
man2/mlock.2
11
man2/mlock.2
|
@ -376,6 +376,17 @@ flag is followed by another call that does not specify this flag, the
|
||||||
changes made by the
|
changes made by the
|
||||||
.B MCL_FUTURE
|
.B MCL_FUTURE
|
||||||
call will be lost.
|
call will be lost.
|
||||||
|
|
||||||
|
The
|
||||||
|
.BR mlock2 ()
|
||||||
|
.B MLOCK_ONFAULT
|
||||||
|
flag and the
|
||||||
|
.BR mlockall ()
|
||||||
|
.B MCL_ONFAULT
|
||||||
|
flag allow efficient memory locking for applications that deal with
|
||||||
|
large mappings where only a (small) portion of pages in the mapping are touched.
|
||||||
|
In such cases, locking all of the pages in a mapping would incur
|
||||||
|
a significant penalty for memory locking.
|
||||||
.SS Linux notes
|
.SS Linux notes
|
||||||
Under Linux,
|
Under Linux,
|
||||||
.BR mlock (),
|
.BR mlock (),
|
||||||
|
|
Loading…
Reference in New Issue