aboutsummaryrefslogtreecommitdiffstats
path: root/man/man2/userfaultfd.2
diff options
context:
space:
mode:
Diffstat (limited to 'man/man2/userfaultfd.2')
-rw-r--r--man/man2/userfaultfd.222
1 files changed, 11 insertions, 11 deletions
diff --git a/man/man2/userfaultfd.2 b/man/man2/userfaultfd.2
index 24a1901105..85936d3b21 100644
--- a/man/man2/userfaultfd.2
+++ b/man/man2/userfaultfd.2
@@ -417,7 +417,7 @@ struct uffd_msg {
struct { /* Since Linux 4.11 */
__u64 from; /* Old address of remapped area */
__u64 to; /* New address of remapped area */
- __u64 len; /* Original mapping length */
+ __u64 len; /* Original mapping size */
} remap;
\&
struct { /* Since Linux 4.11 */
@@ -558,7 +558,7 @@ The new address of the memory range that was remapped using
.BR mremap (2).
.TP
.I remap.len
-The original length of the memory range that was remapped using
+The original size of the memory range that was remapped using
.BR mremap (2).
.TP
.I remove.start
@@ -861,7 +861,7 @@ main(int argc, char *argv[])
char c;
char *addr; /* Start of region handled by userfaultfd */
long uffd; /* userfaultfd file descriptor */
- size_t len, l; /* Length of region handled by userfaultfd */
+ size_t size, i; /* Size of region handled by userfaultfd */
pthread_t thr; /* ID of thread that handles page faults */
struct uffdio_api uffdio_api;
struct uffdio_register uffdio_register;
@@ -872,7 +872,7 @@ main(int argc, char *argv[])
}
\&
page_size = sysconf(_SC_PAGE_SIZE);
- len = strtoull(argv[1], NULL, 0) * page_size;
+ size = strtoull(argv[1], NULL, 0) * page_size;
\&
/* Create and enable userfaultfd object. */
\&
@@ -897,7 +897,7 @@ main(int argc, char *argv[])
actually touch the memory, it will be allocated via
the userfaultfd. */
\&
- addr = mmap(NULL, len, PROT_READ | PROT_WRITE,
+ addr = mmap(NULL, size, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, \-1, 0);
if (addr == MAP_FAILED)
err(EXIT_FAILURE, "mmap");
@@ -909,7 +909,7 @@ main(int argc, char *argv[])
missing pages (i.e., pages that have not yet been faulted in). */
\&
uffdio_register.range.start = (unsigned long) addr;
- uffdio_register.range.len = len;
+ uffdio_register.range.len = size;
uffdio_register.mode = UFFDIO_REGISTER_MODE_MISSING;
if (ioctl(uffd, UFFDIO_REGISTER, &uffdio_register) == \-1)
err(EXIT_FAILURE, "ioctl\-UFFDIO_REGISTER");
@@ -925,14 +925,14 @@ main(int argc, char *argv[])
locations 1024 bytes apart. This will trigger userfaultfd
events for all pages in the region. */
\&
- l = 0xf; /* Ensure that faulting address is not on a page
+ i = 0xf; /* Ensure that faulting address is not on a page
boundary, in order to test that we correctly
handle that case in fault_handling_thread(). */
- while (l < len) {
- c = addr[l];
- printf("Read address %p in %s(): ", addr + l, __func__);
+ while (i < size) {
+ c = addr[i];
+ printf("Read address %p in %s(): ", addr + i, __func__);
printf("%c\[rs]n", c);
- l += 1024;
+ i += 1024;
usleep(100000); /* Slow things down a little */
}
\&