aboutsummaryrefslogtreecommitdiffstats
path: root/man/man2/mlock.2
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2024-11-17 18:47:53 +0100
committerAlejandro Colomar <alx@kernel.org>2024-11-17 21:51:23 +0100
commit18e7c4597c4e72fa5210c7887273e363c456c9ee (patch)
tree97cfd22e731a4c859ae71783d70943ff72e6cb60 /man/man2/mlock.2
parent8fc6fdd8291d906e58a175b5e1b20da680aaeb4a (diff)
downloadman-pages-18e7c4597c4e.tar.gz
man/: Terminology consistency reforms (n, size, length)
Use 'length' for the lenght of a string. Use 'n' for the number of elements. Use 'size' for the number of bytes. (And in wide-character string functions, 'size' also refers to the number of wide characters.) The change is quite large, and I might have made some mistakes. But overall, this should improve consistency in use of these terms. Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man/man2/mlock.2')
-rw-r--r--man/man2/mlock.216
1 files changed, 8 insertions, 8 deletions
diff --git a/man/man2/mlock.2 b/man/man2/mlock.2
index bd14856119..6431a079c0 100644
--- a/man/man2/mlock.2
+++ b/man/man2/mlock.2
@@ -14,10 +14,10 @@ Standard C library
.nf
.B #include <sys/mman.h>
.P
-.BI "int mlock(const void " addr [. len "], size_t " len );
-.BI "int mlock2(const void " addr [. len "], size_t " len ", \
+.BI "int mlock(const void " addr [. size "], size_t " size );
+.BI "int mlock2(const void " addr [. size "], size_t " size ", \
unsigned int " flags );
-.BI "int munlock(const void " addr [. len "], size_t " len );
+.BI "int munlock(const void " addr [. size "], size_t " size );
.P
.BI "int mlockall(int " flags );
.B int munlockall(void);
@@ -45,7 +45,7 @@ Memory locking and unlocking are performed in units of whole pages.
locks pages in the address range starting at
.I addr
and continuing for
-.I len
+.I size
bytes.
All pages that contain a part of the specified address range are
guaranteed to be resident in RAM when the call returns successfully;
@@ -58,7 +58,7 @@ the pages are guaranteed to stay in RAM until later unlocked.
also locks pages in the specified range starting at
.I addr
and continuing for
-.I len
+.I size
bytes.
However, the state of the pages contained in that range after the call
returns successfully will depend on the value in the
@@ -85,7 +85,7 @@ behaves exactly the same as
unlocks pages in the address range starting at
.I addr
and continuing for
-.I len
+.I size
bytes.
After this call, all pages that contain a part of the specified
memory range can be moved to external swap space again by the kernel.
@@ -182,7 +182,7 @@ Some or all of the specified address range could not be locked.
and
.BR munlock ())
The result of the addition
-.IR addr + len
+.IR addr + size
was less than
.I addr
(e.g., the addition may have resulted in an overflow).
@@ -457,7 +457,7 @@ a bug in the kernel's accounting of locked memory for unprivileged processes
meant that if the region specified by
.I addr
and
-.I len
+.I size
overlapped an existing lock,
then the already locked bytes in the overlapping region were counted twice
when checking against the limit.