Debian Codegraph @

templates/man2/mremap.2.pot

raw
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2026-06-05 06:32+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
21 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
22 #, no-wrap
23 msgid "mremap"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
28 #: opensuse-tumbleweed
29 #, no-wrap
30 msgid "2026-02-08"
31 msgstr ""
32
33 #. type: TH
34 #: archlinux debian-unstable
35 #, no-wrap
36 msgid "Linux man-pages 6.18"
37 msgstr ""
38
39 #. type: SH
40 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
41 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
42 #, no-wrap
43 msgid "NAME"
44 msgstr ""
45
46 #. type: Plain text
47 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
48 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
49 msgid "mremap - remap a virtual memory address"
50 msgstr ""
51
52 #. type: SH
53 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
54 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
55 #, no-wrap
56 msgid "LIBRARY"
57 msgstr ""
58
59 #. type: Plain text
60 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
61 #: opensuse-leap-16-1 opensuse-tumbleweed
62 msgid "Standard C library (I<libc>,\\ I<-lc>)"
63 msgstr ""
64
65 #. type: SH
66 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
67 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
68 #, no-wrap
69 msgid "SYNOPSIS"
70 msgstr ""
71
72 #. type: Plain text
73 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
74 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
75 #, no-wrap
76 msgid ""
77 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
78 "B<#include E<lt>sys/mman.hE<gt>>\n"
79 msgstr ""
80
81 #. type: Plain text
82 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
83 #: opensuse-tumbleweed
84 #, no-wrap
85 msgid ""
86 "B<void *mremap(>size_t old_size;\n"
87 "B< void >I<old_address>B<[>I<old_size>B<], size_t >I<old_size>B<,>\n"
88 "B< size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
89 msgstr ""
90
91 #. type: SH
92 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
93 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
94 #, no-wrap
95 msgid "DESCRIPTION"
96 msgstr ""
97
98 #. type: Plain text
99 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
100 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
101 msgid ""
102 "B<mremap>() expands (or shrinks) an existing memory mapping, potentially "
103 "moving it at the same time (controlled by the I<flags> argument and the "
104 "available virtual address space)."
105 msgstr ""
106
107 #. type: Plain text
108 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
109 #: opensuse-tumbleweed
110 msgid ""
111 "Mappings can also simply be moved (without any resizing) by specifying "
112 "equal I<old_size> and I<new_size> and using the B<MREMAP_FIXED> flag (see "
113 "below). Since Linux 6.17, while I<old_address> must be mapped, I<old_size> "
114 "may span multiple mappings including unmapped areas between them when "
115 "performing a simple move. The B<MREMAP_DONTUNMAP> flag may also be "
116 "specified."
117 msgstr ""
118
119 #. type: Plain text
120 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
121 #: opensuse-tumbleweed
122 msgid ""
123 "Similarly, if the operation performs a shrink, that is, if I<old_size> is "
124 "greater than I<new_size>, then I<old_size> may also span multiple mappings, "
125 "which do not have to be adjacent to one another. If this shrink is "
126 "performed in-place, that is, neither B<MREMAP_FIXED>, nor "
127 "B<MREMAP_DONTUNMAP> are specified, I<new_size> may also span multiple VMAs. "
128 "However, if the range is moved, then I<new_size> must span only a single "
129 "mapping."
130 msgstr ""
131
132 #. type: Plain text
133 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
134 #: opensuse-tumbleweed
135 msgid ""
136 "If the operation is neither a B<MREMAP_FIXED> move nor a shrink, then "
137 "I<old_size> must span only a single mapping."
138 msgstr ""
139
140 #. type: Plain text
141 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
142 #: opensuse-tumbleweed
143 msgid ""
144 "I<old_address> is the old address of the first virtual memory block that you "
145 "want to expand, shrink, and/or move. Note that I<old_address> has to be "
146 "page aligned. I<old_size> is the size of the range containing virtual "
147 "memory blocks to be manipulated. I<new_size> is the requested size of the "
148 "virtual memory blocks after the resize. An optional fifth argument, "
149 "I<new_address>, may be provided; see the description of B<MREMAP_FIXED> "
150 "below."
151 msgstr ""
152
153 #. type: Plain text
154 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
155 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
156 msgid ""
157 "If the value of I<old_size> is zero, and I<old_address> refers to a "
158 "shareable mapping (see the description of B<MAP_SHARED> in B<mmap>(2)), then "
159 "B<mremap>() will create a new mapping of the same pages. I<new_size> will "
160 "be the size of the new mapping and the location of the new mapping may be "
161 "specified with I<new_address>; see the description of B<MREMAP_FIXED> "
162 "below. If a new mapping is requested via this method, then the "
163 "B<MREMAP_MAYMOVE> flag must also be specified."
164 msgstr ""
165
166 #. type: Plain text
167 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
168 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
169 msgid ""
170 "The I<flags> bit-mask argument may be 0, or include the following flags:"
171 msgstr ""
172
173 #. type: TP
174 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
175 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
176 #, no-wrap
177 msgid "B<MREMAP_MAYMOVE>"
178 msgstr ""
179
180 #. type: Plain text
181 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
182 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
183 msgid ""
184 "By default, if there is not sufficient space to expand a mapping at its "
185 "current location, then B<mremap>() fails. If this flag is specified, then "
186 "the kernel is permitted to relocate the mapping to a new virtual address, if "
187 "necessary. If the mapping is relocated, then absolute pointers into the old "
188 "mapping location become invalid (offsets relative to the starting address of "
189 "the mapping should be employed)."
190 msgstr ""
191
192 #. type: TP
193 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
194 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
195 #, no-wrap
196 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
197 msgstr ""
198
199 #. type: Plain text
200 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
201 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
202 msgid ""
203 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2). "
204 "If this flag is specified, then B<mremap>() accepts a fifth argument, "
205 "I<void\\ *new_address>, which specifies a page-aligned address to which the "
206 "mapping must be moved. Any previous mapping at the address range specified "
207 "by I<new_address> and I<new_size> is unmapped."
208 msgstr ""
209
210 #. type: Plain text
211 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
212 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
213 msgid ""
214 "If B<MREMAP_FIXED> is specified, then B<MREMAP_MAYMOVE> must also be "
215 "specified."
216 msgstr ""
217
218 #. type: Plain text
219 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
220 #: opensuse-tumbleweed
221 msgid ""
222 "Since Linux 6.17, if I<old_size> is equal to I<new_size> and B<MREMAP_FIXED> "
223 "is specified, then I<old_size> may span beyond the mapping in which "
224 "I<old_address> resides. In this case, gaps between mappings in the original "
225 "range are maintained in the new range. The whole operation is performed "
226 "atomically unless an error arises, in which case the operation may be "
227 "partially completed, that is, some mappings may be moved and others not."
228 msgstr ""
229
230 #. type: Plain text
231 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
232 #: opensuse-tumbleweed
233 msgid ""
234 "Moving multiple mappings is not permitted if any of those mappings have "
235 "either been registered with B<userfaultfd>(2), or map drivers that specify "
236 "their own custom address mapping logic."
237 msgstr ""
238
239 #. type: TP
240 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
241 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
242 #, no-wrap
243 msgid "B<MREMAP_DONTUNMAP> (since Linux 5.7)"
244 msgstr ""
245
246 #. commit e346b3813067d4b17383f975f197a9aa28a3b077
247 #. type: Plain text
248 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
249 #: opensuse-tumbleweed
250 msgid ""
251 "This flag, which must be used in conjunction with B<MREMAP_MAYMOVE>, remaps "
252 "mappings to a new address but does not unmap them from their original "
253 "address."
254 msgstr ""
255
256 #. type: Plain text
257 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
258 #: opensuse-tumbleweed
259 msgid ""
260 "The B<MREMAP_DONTUNMAP> flag can be used only with mappings that are not "
261 "B<VM_DONTEXPAND> or B<VM_PFNMAP>. Before Linux 5.13, the "
262 "B<MREMAP_DONTUNMAP> flag could be used only with private anonymous mappings "
263 "(see the description of B<MAP_PRIVATE> and B<MAP_ANONYMOUS> in B<mmap>(2))."
264 msgstr ""
265
266 #. type: Plain text
267 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
268 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
269 msgid ""
270 "After completion, any access to the range specified by I<old_address> and "
271 "I<old_size> will result in a page fault. The page fault will be handled by "
272 "a B<userfaultfd>(2) handler if the address is in a range previously "
273 "registered with B<userfaultfd>(2). Otherwise, the kernel allocates a zero-"
274 "filled page to handle the fault."
275 msgstr ""
276
277 #. type: Plain text
278 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
279 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
280 msgid ""
281 "The B<MREMAP_DONTUNMAP> flag may be used to atomically move a mapping while "
282 "leaving the source mapped. See NOTES for some possible applications of "
283 "B<MREMAP_DONTUNMAP>."
284 msgstr ""
285
286 #. type: Plain text
287 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
288 #: opensuse-tumbleweed
289 msgid ""
290 "If the memory segments specified by I<old_address> and I<old_size> are "
291 "locked (using B<mlock>(2) or similar), then this lock is maintained when "
292 "the segments are resized and/or relocated. As a consequence, the amount of "
293 "memory locked by the process may change."
294 msgstr ""
295
296 #. type: SH
297 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
298 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
299 #, no-wrap
300 msgid "RETURN VALUE"
301 msgstr ""
302
303 #. type: Plain text
304 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
305 #: opensuse-tumbleweed
306 msgid ""
307 "On success B<mremap>() returns a pointer to the new virtual memory area. "
308 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is "
309 "returned, and I<errno> is set to indicate the error."
310 msgstr ""
311
312 #. type: SH
313 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
314 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
315 #, no-wrap
316 msgid "ERRORS"
317 msgstr ""
318
319 #. type: TP
320 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
321 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
322 #, no-wrap
323 msgid "B<EAGAIN>"
324 msgstr ""
325
326 #. type: Plain text
327 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
328 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
329 msgid ""
330 "The caller tried to expand a memory segment that is locked, but this was not "
331 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
332 msgstr ""
333
334 #. type: TP
335 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
336 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
337 #, no-wrap
338 msgid "B<EFAULT>"
339 msgstr ""
340
341 #. type: Plain text
342 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
343 #: opensuse-tumbleweed
344 msgid ""
345 "Some address in the range I<old_address> to I<old_address>+I<old_size> is an "
346 "invalid virtual memory address for this process. You can also get B<EFAULT> "
347 "even if there exist mappings that cover the whole address space requested, "
348 "but those mappings are of different types, and the B<mremap>() operation "
349 "being performed does not support this."
350 msgstr ""
351
352 #. type: TP
353 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
354 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
355 #, no-wrap
356 msgid "B<EINVAL>"
357 msgstr ""
358
359 #. type: Plain text
360 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
361 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
362 msgid "An invalid argument was given. Possible causes are:"
363 msgstr ""
364
365 #. type: IP
366 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
367 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
368 #, no-wrap
369 msgid "\\[bu]"
370 msgstr ""
371
372 #. type: Plain text
373 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
374 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
375 msgid "I<old_address> was not page aligned;"
376 msgstr ""
377
378 #. type: Plain text
379 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
380 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
381 msgid ""
382 "a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> or "
383 "B<MREMAP_DONTUNMAP> was specified in I<flags>;"
384 msgstr ""
385
386 #. type: Plain text
387 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
388 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
389 msgid "I<new_size> was zero;"
390 msgstr ""
391
392 #. type: Plain text
393 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
394 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
395 msgid "I<new_size> or I<new_address> was invalid;"
396 msgstr ""
397
398 #. type: Plain text
399 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
400 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
401 msgid ""
402 "the new address range specified by I<new_address> and I<new_size> overlapped "
403 "the old address range specified by I<old_address> and I<old_size>;"
404 msgstr ""
405
406 #. type: Plain text
407 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
408 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
409 msgid ""
410 "B<MREMAP_FIXED> or B<MREMAP_DONTUNMAP> was specified without also specifying "
411 "B<MREMAP_MAYMOVE>;"
412 msgstr ""
413
414 #. type: Plain text
415 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
416 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
417 msgid ""
418 "B<MREMAP_DONTUNMAP> was specified, but one or more pages in the range "
419 "specified by I<old_address> and I<old_size> were not private anonymous;"
420 msgstr ""
421
422 #. type: Plain text
423 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
424 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
425 msgid ""
426 "B<MREMAP_DONTUNMAP> was specified and I<old_size> was not equal to "
427 "I<new_size>;"
428 msgstr ""
429
430 #. type: Plain text
431 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
432 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
433 msgid ""
434 "I<old_size> was zero and I<old_address> does not refer to a shareable "
435 "mapping (but see BUGS);"
436 msgstr ""
437
438 #. type: Plain text
439 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
440 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
441 msgid "I<old_size> was zero and the B<MREMAP_MAYMOVE> flag was not specified."
442 msgstr ""
443
444 #. type: TP
445 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
446 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
447 #, no-wrap
448 msgid "B<ENOMEM>"
449 msgstr ""
450
451 #. type: Plain text
452 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
453 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
454 msgid ""
455 "Not enough memory was available to complete the operation. Possible causes "
456 "are:"
457 msgstr ""
458
459 #. type: Plain text
460 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
461 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
462 msgid ""
463 "The memory area cannot be expanded at the current virtual address, and the "
464 "B<MREMAP_MAYMOVE> flag is not set in I<flags>. Or, there is not enough "
465 "(virtual) memory available."
466 msgstr ""
467
468 #. type: Plain text
469 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
470 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
471 msgid ""
472 "B<MREMAP_DONTUNMAP> was used causing a new mapping to be created that would "
473 "exceed the (virtual) memory available. Or, it would exceed the maximum "
474 "number of allowed mappings."
475 msgstr ""
476
477 #. type: SH
478 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
479 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
480 #, no-wrap
481 msgid "STANDARDS"
482 msgstr ""
483
484 #. type: Plain text
485 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
486 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
487 msgid "Linux."
488 msgstr ""
489
490 #. type: SH
491 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
492 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
493 #, no-wrap
494 msgid "HISTORY"
495 msgstr ""
496
497 #. 4.2BSD had a (never actually implemented)
498 #. .BR mremap (2)
499 #. call with completely different semantics.
500 #. .P
501 #. type: Plain text
502 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
503 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
504 msgid ""
505 "Prior to glibc 2.4, glibc did not expose the definition of B<MREMAP_FIXED>, "
506 "and the prototype for B<mremap>() did not allow for the I<new_address> "
507 "argument."
508 msgstr ""
509
510 #. type: SH
511 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
512 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
513 #, no-wrap
514 msgid "NOTES"
515 msgstr ""
516
517 #. type: Plain text
518 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
519 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
520 msgid ""
521 "B<mremap>() changes the mapping between virtual addresses and memory "
522 "pages. This can be used to implement a very efficient B<realloc>(3)."
523 msgstr ""
524
525 #. type: Plain text
526 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
527 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
528 msgid ""
529 "In Linux, memory is divided into pages. A process has (one or) several "
530 "linear virtual memory segments. Each virtual memory segment has one or more "
531 "mappings to real memory pages (in the page table). Each virtual memory "
532 "segment has its own protection (access rights), which may cause a "
533 "segmentation violation (B<SIGSEGV>) if the memory is accessed incorrectly "
534 "(e.g., writing to a read-only segment). Accessing virtual memory outside of "
535 "the segments will also cause a segmentation violation."
536 msgstr ""
537
538 #. type: Plain text
539 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
540 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
541 msgid ""
542 "If B<mremap>() is used to move or expand an area locked with B<mlock>(2) "
543 "or equivalent, the B<mremap>() call will make a best effort to populate the "
544 "new area but will not fail with B<ENOMEM> if the area cannot be populated."
545 msgstr ""
546
547 #. type: SS
548 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
549 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
550 #, no-wrap
551 msgid "MREMAP_DONTUNMAP use cases"
552 msgstr ""
553
554 #. type: Plain text
555 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
556 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
557 msgid "Possible applications for B<MREMAP_DONTUNMAP> include:"
558 msgstr ""
559
560 #. type: Plain text
561 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
562 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
563 msgid ""
564 "Non-cooperative B<userfaultfd>(2): an application can yank out a virtual "
565 "address range using B<MREMAP_DONTUNMAP> and then employ a B<userfaultfd>(2) "
566 "handler to handle the page faults that subsequently occur as other threads "
567 "in the process touch pages in the yanked range."
568 msgstr ""
569
570 #. type: Plain text
571 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
572 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
573 msgid ""
574 "Garbage collection: B<MREMAP_DONTUNMAP> can be used in conjunction with "
575 "B<userfaultfd>(2) to implement garbage collection algorithms (e.g., in a "
576 "Java virtual machine). Such an implementation can be cheaper (and simpler) "
577 "than conventional garbage collection techniques that involve marking pages "
578 "with protection B<PROT_NONE> in conjunction with the use of a B<SIGSEGV> "
579 "handler to catch accesses to those pages."
580 msgstr ""
581
582 #. type: SH
583 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
584 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
585 #, no-wrap
586 msgid "BUGS"
587 msgstr ""
588
589 #. commit dba58d3b8c5045ad89c1c95d33d01451e3964db7
590 #. type: Plain text
591 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
592 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
593 msgid ""
594 "Before Linux 4.14, if I<old_size> was zero and the mapping referred to by "
595 "I<old_address> was a private mapping (see the description of B<MAP_PRIVATE> "
596 "in B<mmap>(2)), B<mremap>() created a new private mapping unrelated to the "
597 "original mapping. This behavior was unintended and probably unexpected in "
598 "user-space applications (since the intention of B<mremap>() is to create a "
599 "new mapping based on the original mapping). Since Linux 4.14, B<mremap>() "
600 "fails with the error B<EINVAL> in this scenario."
601 msgstr ""
602
603 #. type: SH
604 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
605 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
606 #, no-wrap
607 msgid "SEE ALSO"
608 msgstr ""
609
610 #. type: Plain text
611 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
612 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
613 msgid ""
614 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
615 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
616 msgstr ""
617
618 #. type: Plain text
619 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
620 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
621 msgid ""
622 "Your favorite text book on operating systems for more information on paged "
623 "memory (e.g., I<Modern Operating Systems> by Andrew S.\\& Tanenbaum, "
624 "I<Inside Linux> by Randolph Bentson, I<The Design of the UNIX Operating "
625 "System> by Maurice J.\\& Bach)"
626 msgstr ""
627
628 #. type: TH
629 #: debian-trixie
630 #, no-wrap
631 msgid "2024-05-02"
632 msgstr ""
633
634 #. type: TH
635 #: debian-trixie
636 #, no-wrap
637 msgid "Linux man-pages 6.9.1"
638 msgstr ""
639
640 #. type: Plain text
641 #: debian-trixie
642 msgid "Standard C library (I<libc>, I<-lc>)"
643 msgstr ""
644
645 #. type: Plain text
646 #: debian-trixie fedora-44 fedora-rawhide
647 #, no-wrap
648 msgid ""
649 "B<void *mremap(void >I<old_address>B<[.>I<old_size>B<], size_t >I<old_size>B<,>\n"
650 "B< size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
651 msgstr ""
652
653 #. type: Plain text
654 #: debian-trixie fedora-44 fedora-rawhide
655 msgid ""
656 "I<old_address> is the old address of the virtual memory block that you want "
657 "to expand (or shrink). Note that I<old_address> has to be page aligned. "
658 "I<old_size> is the old size of the virtual memory block. I<new_size> is the "
659 "requested size of the virtual memory block after the resize. An optional "
660 "fifth argument, I<new_address>, may be provided; see the description of "
661 "B<MREMAP_FIXED> below."
662 msgstr ""
663
664 #. commit e346b3813067d4b17383f975f197a9aa28a3b077
665 #. type: Plain text
666 #: debian-trixie fedora-44 fedora-rawhide
667 msgid ""
668 "This flag, which must be used in conjunction with B<MREMAP_MAYMOVE>, remaps "
669 "a mapping to a new address but does not unmap the mapping at I<old_address>."
670 msgstr ""
671
672 #. type: Plain text
673 #: debian-trixie
674 msgid ""
675 "The B<MREMAP_DONTUNMAP> flag can be used only with private anonymous "
676 "mappings (see the description of B<MAP_PRIVATE> and B<MAP_ANONYMOUS> in "
677 "B<mmap>(2))."
678 msgstr ""
679
680 #. type: Plain text
681 #: debian-trixie fedora-44 fedora-rawhide
682 msgid ""
683 "If the memory segment specified by I<old_address> and I<old_size> is locked "
684 "(using B<mlock>(2) or similar), then this lock is maintained when the "
685 "segment is resized and/or relocated. As a consequence, the amount of memory "
686 "locked by the process may change."
687 msgstr ""
688
689 #. type: Plain text
690 #: debian-trixie fedora-44 fedora-rawhide
691 msgid ""
692 "On success B<mremap>() returns a pointer to the new virtual memory area. "
693 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
694 "and I<errno> is set to indicate the error."
695 msgstr ""
696
697 #. type: Plain text
698 #: debian-trixie fedora-44 fedora-rawhide
699 msgid ""
700 "Some address in the range I<old_address> to I<old_address>+I<old_size> is an "
701 "invalid virtual memory address for this process. You can also get B<EFAULT> "
702 "even if there exist mappings that cover the whole address space requested, "
703 "but those mappings are of different types."
704 msgstr ""
705
706 #. type: TH
707 #: fedora-44 fedora-rawhide
708 #, no-wrap
709 msgid "2024-11-13"
710 msgstr ""
711
712 #. type: TH
713 #: fedora-44 fedora-rawhide
714 #, no-wrap
715 msgid "Linux man-pages 6.13"
716 msgstr ""
717
718 #. type: Plain text
719 #: fedora-44 fedora-rawhide
720 msgid ""
721 "The B<MREMAP_DONTUNMAP> flag can be used only with mappings that are not "
722 "B<VM_DONTEXPAND> or B<VM_MIXEDMAP>. Before Linux 5.13, the "
723 "B<MREMAP_DONTUNMAP> flag could be used only with private anonymous mappings "
724 "(see the description of B<MAP_PRIVATE> and B<MAP_ANONYMOUS> in B<mmap>(2))."
725 msgstr ""
726
727 #. type: TH
728 #: mageia-cauldron
729 #, no-wrap
730 msgid "Linux man-pages 6.17"
731 msgstr ""
732
733 #. type: TH
734 #: opensuse-leap-16-1 opensuse-tumbleweed
735 #, no-wrap
736 msgid "Linux man-pages (unreleased)"
737 msgstr ""