summaryrefslogtreecommitdiffstats
path: root/man2/mlock.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/mlock.2')
-rw-r--r--man2/mlock.246
1 files changed, 23 insertions, 23 deletions
diff --git a/man2/mlock.2 b/man2/mlock.2
index 30f6ac130..293fb0d37 100644
--- a/man2/mlock.2
+++ b/man2/mlock.2
@@ -146,9 +146,9 @@ or both.
If
.B MCL_FUTURE
has been specified, then a later system call (e.g.,
-.BR mmap (2),
-.BR sbrk (2),
-.BR malloc (3)),
+.MR mmap 2 ,
+.MR sbrk 2 ,
+.MR malloc 3 ),
may fail if it would cause the number of locked bytes to exceed
the permitted maximum (see below).
In the same circumstances, stack growth may likewise fail:
@@ -284,7 +284,7 @@ has locked using
.BR mlock2 (),
.BR mlockall (),
and
-.BR mmap (2)
+.MR mmap 2
.BR MAP_LOCKED .
.SH STANDARDS
.TP
@@ -320,7 +320,7 @@ are available,
.B _POSIX_MEMLOCK
is defined in \fI<unistd.h>\fP to a value greater than 0.
(See also
-.BR sysconf (3).)
+.MR sysconf 3 .)
.\" POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
.\" -1: unavailable, 0: ask using sysconf().
.\" glibc defines it to 1.
@@ -346,7 +346,7 @@ deterministic timing, and, like scheduling, paging is one major cause
of unexpected program execution delays.
Real-time applications will
usually also switch to a real-time scheduler with
-.BR sched_setscheduler (2).
+.MR sched_setscheduler 2 .
Cryptographic security software often handles critical bytes like
passwords or secret keys as data structures.
As a result of paging,
@@ -371,9 +371,9 @@ The dummy writes ensure that not even copy-on-write
page faults can occur in the critical section.
.P
Memory locks are not inherited by a child created via
-.BR fork (2)
+.MR fork 2
and are automatically removed (unlocked) during an
-.BR execve (2)
+.MR execve 2
or when the process terminates.
The
.BR mlockall ()
@@ -381,17 +381,17 @@ The
and
.B MCL_FUTURE | MCL_ONFAULT
settings are not inherited by a child created via
-.BR fork (2)
+.MR fork 2
and are cleared during an
-.BR execve (2).
+.MR execve 2 .
.P
Note that
-.BR fork (2)
+.MR fork 2
will prepare the address space for a copy-on-write operation.
The consequence is that any write access that follows will cause
a page fault that in turn may cause high latencies for a real-time process.
Therefore, it is crucial not to invoke
-.BR fork (2)
+.MR fork 2
after an
.BR mlockall ()
or
@@ -401,7 +401,7 @@ a process which also has a thread running at elevated priority.
.P
The memory lock on an address range is automatically removed
if the address range is unmapped via
-.BR munmap (2).
+.MR munmap 2 .
.P
Memory locks do not stack, that is, pages which have been locked several times
by calls to
@@ -478,7 +478,7 @@ a bug caused the
.BR mlockall ()
.B MCL_FUTURE
flag to be inherited across a
-.BR fork (2).
+.MR fork 2 .
This was rectified in Linux 2.4.18.
.P
Since Linux 2.6.9, if a privileged process calls
@@ -488,8 +488,8 @@ and later drops privileges (loses the
capability by, for example,
setting its effective UID to a nonzero value),
then subsequent memory allocations (e.g.,
-.BR mmap (2),
-.BR brk (2))
+.MR mmap 2 ,
+.MR brk 2 )
will fail if the
.B RLIMIT_MEMLOCK
resource limit is encountered.
@@ -498,10 +498,10 @@ resource limit is encountered.
.\" "Rationale for RLIMIT_MEMLOCK"
.\" 23 Jan 2006
.SH SEE ALSO
-.BR mincore (2),
-.BR mmap (2),
-.BR setrlimit (2),
-.BR shmctl (2),
-.BR sysconf (3),
-.BR proc (5),
-.BR capabilities (7)
+.MR mincore 2 ,
+.MR mmap 2 ,
+.MR setrlimit 2 ,
+.MR shmctl 2 ,
+.MR sysconf 3 ,
+.MR proc 5 ,
+.MR capabilities 7