diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 10:52:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 10:52:33 +0000 |
commit | 2c3307fb903f427be3d021c5780b75cac9af2ce8 (patch) | |
tree | 65cf431f40b7481d81ae2dfce9576342686448f7 /upstream/opensuse-tumbleweed/man2/mremap.2 | |
parent | Releasing progress-linux version 4.22.0-1~progress7.99u1. (diff) | |
download | manpages-l10n-2c3307fb903f427be3d021c5780b75cac9af2ce8.tar.xz manpages-l10n-2c3307fb903f427be3d021c5780b75cac9af2ce8.zip |
Merging upstream version 4.23.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/opensuse-tumbleweed/man2/mremap.2')
-rw-r--r-- | upstream/opensuse-tumbleweed/man2/mremap.2 | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/upstream/opensuse-tumbleweed/man2/mremap.2 b/upstream/opensuse-tumbleweed/man2/mremap.2 index f2b2b980..d25b2344 100644 --- a/upstream/opensuse-tumbleweed/man2/mremap.2 +++ b/upstream/opensuse-tumbleweed/man2/mremap.2 @@ -8,7 +8,7 @@ .\" Update for Linux 1.3.87 and later .\" 2005-10-11 mtk: Added NOTES for MREMAP_FIXED; revised EINVAL text. .\" -.TH mremap 2 2023-03-30 "Linux man-pages 6.05.01" +.TH mremap 2 2024-05-02 "Linux man-pages (unreleased)" .SH NAME mremap \- remap a virtual memory address .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <sys/mman.h> -.PP +.P .BI "void *mremap(void " old_address [. old_size "], size_t " old_size , .BI " size_t " new_size ", int " flags ", ... /* void *" new_address " */);" .fi @@ -27,7 +27,7 @@ Standard C library expands (or shrinks) an existing memory mapping, potentially moving it at the same time (controlled by the \fIflags\fP argument and the available virtual address space). -.PP +.P \fIold_address\fP is the old address of the virtual memory block that you want to expand (or shrink). Note that \fIold_address\fP has to be page @@ -41,11 +41,13 @@ An optional fifth argument, may be provided; see the description of .B MREMAP_FIXED below. -.PP +.P If the value of \fIold_size\fP is zero, and \fIold_address\fP refers to -a shareable mapping (see -.BR mmap (2) -.BR MAP_SHARED ), +a shareable mapping +(see the description of +.B MAP_SHARED +in +.BR mmap (2)), then .BR mremap () will create a new mapping of the same pages. @@ -57,7 +59,7 @@ below. If a new mapping is requested via this method, then the .B MREMAP_MAYMOVE flag must also be specified. -.PP +.P The \fIflags\fP bit-mask argument may be 0, or include the following flags: .TP .B MREMAP_MAYMOVE @@ -131,7 +133,7 @@ flag may be used to atomically move a mapping while leaving the source mapped. See NOTES for some possible applications of .BR MREMAP_DONTUNMAP . -.PP +.P If the memory segment specified by .I old_address and @@ -248,7 +250,7 @@ Linux. .\" 4.2BSD had a (never actually implemented) .\" .BR mremap (2) .\" call with completely different semantics. -.\" .PP +.\" .P Prior to glibc 2.4, glibc did not expose the definition of .BR MREMAP_FIXED , and the prototype for @@ -262,7 +264,7 @@ changes the mapping between virtual addresses and memory pages. This can be used to implement a very efficient .BR realloc (3). -.PP +.P In Linux, memory is divided into pages. A process has (one or) several linear virtual memory segments. @@ -276,7 +278,7 @@ if the memory is accessed incorrectly (e.g., writing to a read-only segment). Accessing virtual memory outside of the segments will also cause a segmentation violation. -.PP +.P If .BR mremap () is used to move or expand an area locked with @@ -321,7 +323,10 @@ if was zero and the mapping referred to by .I old_address was a private mapping -.RB ( mmap "(2) " MAP_PRIVATE ), +(see the description of +.B MAP_PRIVATE +in +.BR mmap (2)), .BR mremap () created a new private mapping unrelated to the original mapping. This behavior was unintended @@ -344,7 +349,7 @@ in this scenario. .BR sbrk (2), .BR malloc (3), .BR realloc (3) -.PP +.P Your favorite text book on operating systems for more information on paged memory (e.g., \fIModern Operating Systems\fP by Andrew S.\& Tanenbaum, |