Debian Codegraph @

templates/man3/mallopt.3.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:30+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 "mallopt"
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 "mallopt - set memory allocation parameters"
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 "B<#include E<lt>malloc.hE<gt>>\n"
77 msgstr ""
78
79 #. type: Plain text
80 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
81 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
82 #, no-wrap
83 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>\n"
84 msgstr ""
85
86 #. type: SH
87 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
88 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
89 #, no-wrap
90 msgid "DESCRIPTION"
91 msgstr ""
92
93 #. type: Plain text
94 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
95 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
96 msgid ""
97 "The B<mallopt>() function adjusts parameters that control the behavior of "
98 "the memory-allocation functions (see B<malloc>(3)). The I<param> argument "
99 "specifies the parameter to be modified, and I<value> specifies the new value "
100 "for that parameter."
101 msgstr ""
102
103 #. type: Plain text
104 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
105 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
106 msgid "The following values can be specified for I<param>:"
107 msgstr ""
108
109 #. type: TP
110 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
111 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
112 #, no-wrap
113 msgid "B<M_ARENA_MAX>"
114 msgstr ""
115
116 #. type: Plain text
117 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
118 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
119 msgid ""
120 "If this parameter has a nonzero value, it defines a hard limit on the "
121 "maximum number of arenas that can be created. An arena represents a pool of "
122 "memory that can be used by B<malloc>(3) (and similar) calls to service "
123 "allocation requests. Arenas are thread safe and therefore may have multiple "
124 "concurrent memory requests. The trade-off is between the number of threads "
125 "and the number of arenas. The more arenas you have, the lower the per-"
126 "thread contention, but the higher the memory usage."
127 msgstr ""
128
129 #. type: Plain text
130 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
131 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
132 msgid ""
133 "The default value of this parameter is 0, meaning that the limit on the "
134 "number of arenas is determined according to the setting of B<M_ARENA_TEST>."
135 msgstr ""
136
137 #. type: Plain text
138 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
139 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
140 msgid ""
141 "This parameter has been available since glibc 2.10 via B<--enable-"
142 "experimental-malloc>, and since glibc 2.15 by default. In some versions of "
143 "the allocator there was no limit on the number of created arenas (e.g., "
144 "CentOS 5, RHEL 5)."
145 msgstr ""
146
147 #. type: Plain text
148 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
149 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
150 msgid ""
151 "When employing newer glibc versions, applications may in some cases exhibit "
152 "high contention when accessing arenas. In these cases, it may be beneficial "
153 "to increase B<M_ARENA_MAX> to match the number of threads. This is similar "
154 "in behavior to strategies taken by tcmalloc and jemalloc (e.g., per-thread "
155 "allocation pools)."
156 msgstr ""
157
158 #. type: TP
159 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
160 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
161 #, no-wrap
162 msgid "B<M_ARENA_TEST>"
163 msgstr ""
164
165 #. type: Plain text
166 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
167 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
168 msgid ""
169 "This parameter specifies a value, in number of arenas created, at which "
170 "point the system configuration will be examined to determine a hard limit on "
171 "the number of created arenas. (See B<M_ARENA_MAX> for the definition of an "
172 "arena.)"
173 msgstr ""
174
175 #. type: Plain text
176 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
177 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
178 msgid ""
179 "The computation of the arena hard limit is implementation-defined and is "
180 "usually calculated as a multiple of the number of available CPUs. Once the "
181 "hard limit is computed, the result is final and constrains the total number "
182 "of arenas."
183 msgstr ""
184
185 #. type: Plain text
186 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
187 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
188 msgid ""
189 "The default value for the B<M_ARENA_TEST> parameter is 2 on systems where "
190 "I<sizeof(long)> is 4; otherwise the default value is 8."
191 msgstr ""
192
193 #. type: Plain text
194 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
195 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
196 msgid ""
197 "This parameter has been available since glibc 2.10 via B<--enable-"
198 "experimental-malloc>, and since glibc 2.15 by default."
199 msgstr ""
200
201 #. type: Plain text
202 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
203 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
204 msgid ""
205 "The value of B<M_ARENA_TEST> is not used when B<M_ARENA_MAX> has a nonzero "
206 "value."
207 msgstr ""
208
209 #. type: TP
210 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
211 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
212 #, no-wrap
213 msgid "B<M_CHECK_ACTION>"
214 msgstr ""
215
216 #. type: Plain text
217 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
218 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
219 msgid ""
220 "Setting this parameter controls how glibc responds when various kinds of "
221 "programming errors are detected (e.g., freeing the same pointer twice). The "
222 "3 least significant bits (2, 1, and 0) of the value assigned to this "
223 "parameter determine the glibc behavior, as follows:"
224 msgstr ""
225
226 #. type: TP
227 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
228 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
229 #, no-wrap
230 msgid "Bit 0"
231 msgstr ""
232
233 #. type: Plain text
234 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
235 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
236 msgid ""
237 "If this bit is set, then print a one-line message on I<stderr> that provides "
238 "details about the error. The message starts with the string \"***\\ glibc "
239 "detected\\ ***\", followed by the program name, the name of the memory-"
240 "allocation function in which the error was detected, a brief description of "
241 "the error, and the memory address where the error was detected."
242 msgstr ""
243
244 #. type: TP
245 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
246 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
247 #, no-wrap
248 msgid "Bit 1"
249 msgstr ""
250
251 #. type: Plain text
252 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
253 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
254 msgid ""
255 "If this bit is set, then, after printing any error message specified by bit "
256 "0, the program is terminated by calling B<abort>(3). Since glibc 2.4, if "
257 "bit 0 is also set, then, between printing the error message and aborting, "
258 "the program also prints a stack trace in the manner of B<backtrace>(3), and "
259 "prints the process's memory mapping in the style of I</proc/>pidI</maps> "
260 "(see B<proc>(5))."
261 msgstr ""
262
263 #. type: TP
264 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
265 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
266 #, no-wrap
267 msgid "Bit 2 (since glibc 2.4)"
268 msgstr ""
269
270 #. type: Plain text
271 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
272 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
273 msgid ""
274 "This bit has an effect only if bit 0 is also set. If this bit is set, then "
275 "the one-line message describing the error is simplified to contain just the "
276 "name of the function where the error was detected and the brief description "
277 "of the error."
278 msgstr ""
279
280 #. type: Plain text
281 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
282 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
283 msgid "The remaining bits in I<value> are ignored."
284 msgstr ""
285
286 #. type: Plain text
287 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
288 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
289 msgid ""
290 "Combining the above details, the following numeric values are meaningful for "
291 "B<M_CHECK_ACTION>:"
292 msgstr ""
293
294 #. type: TP
295 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
296 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
297 #, no-wrap
298 msgid "B<0>"
299 msgstr ""
300
301 #. type: Plain text
302 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
303 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
304 msgid "Ignore error conditions; continue execution (with undefined results)."
305 msgstr ""
306
307 #. type: TP
308 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
309 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
310 #, no-wrap
311 msgid "B<1>"
312 msgstr ""
313
314 #. type: Plain text
315 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
316 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
317 msgid "Print a detailed error message and continue execution."
318 msgstr ""
319
320 #. type: TP
321 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
322 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
323 #, no-wrap
324 msgid "B<2>"
325 msgstr ""
326
327 #. type: Plain text
328 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
329 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
330 msgid "Abort the program."
331 msgstr ""
332
333 #. type: TP
334 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
335 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
336 #, no-wrap
337 msgid "B<3>"
338 msgstr ""
339
340 #. type: Plain text
341 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
342 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
343 msgid ""
344 "Print detailed error message, stack trace, and memory mappings, and abort "
345 "the program."
346 msgstr ""
347
348 #. type: TP
349 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
350 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
351 #, no-wrap
352 msgid "B<5>"
353 msgstr ""
354
355 #. type: Plain text
356 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
357 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
358 msgid "Print a simple error message and continue execution."
359 msgstr ""
360
361 #. type: TP
362 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
363 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
364 #, no-wrap
365 msgid "B<7>"
366 msgstr ""
367
368 #. type: Plain text
369 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
370 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
371 msgid ""
372 "Print simple error message, stack trace, and memory mappings, and abort the "
373 "program."
374 msgstr ""
375
376 #. type: Plain text
377 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
378 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
379 msgid ""
380 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
381 "3. In glibc 2.3.3 and earlier, the default value is 1."
382 msgstr ""
383
384 #. type: Plain text
385 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
386 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
387 msgid ""
388 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
389 "crash may happen much later, and the true cause of the problem is then very "
390 "hard to track down."
391 msgstr ""
392
393 #. type: TP
394 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
395 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
396 #, no-wrap
397 msgid "B<M_MMAP_MAX>"
398 msgstr ""
399
400 #. The following text adapted from comments in the glibc source:
401 #. type: Plain text
402 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
403 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
404 msgid ""
405 "This parameter specifies the maximum number of allocation requests that may "
406 "be simultaneously serviced using B<mmap>(2). This parameter exists because "
407 "some systems have a limited number of internal tables for use by B<mmap>(2), "
408 "and using more than a few of them may degrade performance."
409 msgstr ""
410
411 #. type: Plain text
412 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
413 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
414 msgid ""
415 "The default value is 65,536, a value which has no special significance and "
416 "which serves only as a safeguard. Setting this parameter to 0 disables the "
417 "use of B<mmap>(2) for servicing large allocation requests."
418 msgstr ""
419
420 #. type: TP
421 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
422 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
423 #, no-wrap
424 msgid "B<M_MMAP_THRESHOLD>"
425 msgstr ""
426
427 #. type: Plain text
428 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
429 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
430 msgid ""
431 "For allocations greater than or equal to the limit specified (in bytes) by "
432 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
433 "allocation functions employ B<mmap>(2) instead of increasing the program "
434 "break using B<sbrk>(2)."
435 msgstr ""
436
437 #. type: Plain text
438 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
439 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
440 msgid ""
441 "Allocating memory using B<mmap>(2) has the significant advantage that the "
442 "allocated memory blocks can always be independently released back to the "
443 "system. (By contrast, the heap can be trimmed only if memory is freed at "
444 "the top end.) On the other hand, there are some disadvantages to the use of "
445 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
446 "later allocations; memory may be wasted because B<mmap>(2) allocations must "
447 "be page-aligned; and the kernel must perform the expensive task of zeroing "
448 "out memory allocated via B<mmap>(2). Balancing these factors leads to a "
449 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
450 msgstr ""
451
452 #. type: Plain text
453 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
454 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
455 msgid ""
456 "The lower limit for this parameter is 0. The upper limit is "
457 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
458 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
459 msgstr ""
460
461 #. type: Plain text
462 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
463 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
464 msgid ""
465 "I<Note>: Nowadays, glibc uses a dynamic mmap threshold by default. The "
466 "initial value of the threshold is 128*1024, but when blocks larger than the "
467 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
468 "are freed, the threshold is adjusted upward to the size of the freed block. "
469 "When dynamic mmap thresholding is in effect, the threshold for trimming the "
470 "heap is also dynamically adjusted to be twice the dynamic mmap threshold. "
471 "Dynamic adjustment of the mmap threshold is disabled if any of the "
472 "B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
473 "parameters is set."
474 msgstr ""
475
476 #. type: TP
477 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
478 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
479 #, no-wrap
480 msgid "B<M_MXFAST> (since glibc 2.3)"
481 msgstr ""
482
483 #. The following text adapted from comments in the glibc sources:
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 ""
488 "Set the upper limit for memory allocation requests that are satisfied using "
489 "\"fastbins\". (The measurement unit for this parameter is bytes.) Fastbins "
490 "are storage areas that hold deallocated blocks of memory of the same size "
491 "without merging adjacent free blocks. Subsequent reallocation of blocks of "
492 "the same size can be handled very quickly by allocating from the fastbin, "
493 "although memory fragmentation and the overall memory footprint of the "
494 "program can increase."
495 msgstr ""
496
497 #. type: Plain text
498 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
499 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
500 msgid ""
501 "The default value for this parameter is I<64*sizeof(size_t)/4> (i.e., 64 on "
502 "32-bit architectures). The range for this parameter is 0 to "
503 "I<80*sizeof(size_t)/4>. Setting B<M_MXFAST> to 0 disables the use of "
504 "fastbins."
505 msgstr ""
506
507 #. type: TP
508 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
509 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
510 #, no-wrap
511 msgid "B<M_PERTURB> (since glibc 2.4)"
512 msgstr ""
513
514 #. type: Plain text
515 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
516 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
517 msgid ""
518 "If this parameter is set to a nonzero value, then bytes of allocated memory "
519 "(other than allocations via B<calloc>(3)) are initialized to the complement "
520 "of the value in the least significant byte of I<value>, and when allocated "
521 "memory is released using B<free>(3), the freed bytes are set to the least "
522 "significant byte of I<value>. This can be useful for detecting errors where "
523 "programs incorrectly rely on allocated memory being initialized to zero, or "
524 "reuse values in memory that has already been freed."
525 msgstr ""
526
527 #. type: Plain text
528 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
529 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
530 msgid "The default value for this parameter is 0."
531 msgstr ""
532
533 #. type: TP
534 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
535 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
536 #, no-wrap
537 msgid "B<M_TOP_PAD>"
538 msgstr ""
539
540 #. type: Plain text
541 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
542 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
543 msgid ""
544 "This parameter defines the amount of padding to employ when calling "
545 "B<sbrk>(2) to modify the program break. (The measurement unit for this "
546 "parameter is bytes.) This parameter has an effect in the following "
547 "circumstances:"
548 msgstr ""
549
550 #. type: IP
551 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
552 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
553 #, no-wrap
554 msgid "\\[bu]"
555 msgstr ""
556
557 #. type: Plain text
558 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
559 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
560 msgid ""
561 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
562 "the B<sbrk>(2) request."
563 msgstr ""
564
565 #. type: Plain text
566 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
567 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
568 msgid ""
569 "When the heap is trimmed as a consequence of calling B<free>(3) (see the "
570 "discussion of B<M_TRIM_THRESHOLD>) this much free space is preserved at the "
571 "top of the heap."
572 msgstr ""
573
574 #. type: Plain text
575 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
576 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
577 msgid ""
578 "In either case, the amount of padding is always rounded to a system page "
579 "boundary."
580 msgstr ""
581
582 #. type: Plain text
583 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
584 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
585 msgid ""
586 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
587 "system calls (when the parameter is set low) and wasting unused memory at "
588 "the top of the heap (when the parameter is set high)."
589 msgstr ""
590
591 #. DEFAULT_TOP_PAD in glibc source
592 #. type: Plain text
593 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
594 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
595 msgid "The default value for this parameter is 128*1024."
596 msgstr ""
597
598 #. type: TP
599 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
600 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
601 #, no-wrap
602 msgid "B<M_TRIM_THRESHOLD>"
603 msgstr ""
604
605 #. type: Plain text
606 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
607 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
608 msgid ""
609 "When the amount of contiguous free memory at the top of the heap grows "
610 "sufficiently large, B<free>(3) employs B<sbrk>(2) to release this memory "
611 "back to the system. (This can be useful in programs that continue to "
612 "execute for a long period after freeing a significant amount of memory.) "
613 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
614 "this block of memory must reach before B<sbrk>(2) is used to trim the heap."
615 msgstr ""
616
617 #. type: Plain text
618 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
619 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
620 msgid ""
621 "The default value for this parameter is 128*1024. Setting "
622 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
623 msgstr ""
624
625 #. type: Plain text
626 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
627 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
628 msgid ""
629 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
630 "of system calls (when the parameter is set low) and wasting unused memory "
631 "at the top of the heap (when the parameter is set high)."
632 msgstr ""
633
634 #. type: SS
635 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
636 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
637 #, no-wrap
638 msgid "Environment variables"
639 msgstr ""
640
641 #. type: Plain text
642 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
643 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
644 msgid ""
645 "A number of environment variables can be defined to modify some of the same "
646 "parameters as are controlled by B<mallopt>(). Using these variables has the "
647 "advantage that the source code of the program need not be changed. To be "
648 "effective, these variables must be defined before the first call to a memory-"
649 "allocation function. (If the same parameters are adjusted via B<mallopt>(), "
650 "then the B<mallopt>() settings take precedence.) For security reasons, "
651 "these variables are ignored in set-user-ID and set-group-ID programs."
652 msgstr ""
653
654 #. type: Plain text
655 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
656 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
657 msgid ""
658 "The environment variables are as follows (note the trailing underscore at "
659 "the end of the name of some variables):"
660 msgstr ""
661
662 #. type: TP
663 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
664 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
665 #, no-wrap
666 msgid "B<MALLOC_ARENA_MAX>"
667 msgstr ""
668
669 #. type: Plain text
670 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
671 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
672 msgid "Controls the same parameter as B<mallopt>() B<M_ARENA_MAX>."
673 msgstr ""
674
675 #. type: TP
676 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
677 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
678 #, no-wrap
679 msgid "B<MALLOC_ARENA_TEST>"
680 msgstr ""
681
682 #. type: Plain text
683 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
684 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
685 msgid "Controls the same parameter as B<mallopt>() B<M_ARENA_TEST>."
686 msgstr ""
687
688 #. type: TP
689 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
690 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
691 #, no-wrap
692 msgid "B<MALLOC_CHECK_>"
693 msgstr ""
694
695 #. On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
696 #. when MALLOC_CHECK_ was set.
697 #. type: Plain text
698 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
699 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
700 msgid ""
701 "This environment variable controls the same parameter as B<mallopt>() "
702 "B<M_CHECK_ACTION>. If this variable is set to a nonzero value, then a "
703 "special implementation of the memory-allocation functions is used. (This is "
704 "accomplished using the B<malloc_hook>(3) feature.) This implementation "
705 "performs additional error checking, but is slower than the standard set of "
706 "memory-allocation functions. (This implementation does not detect all "
707 "possible errors; memory leaks can still occur.)"
708 msgstr ""
709
710 #. type: Plain text
711 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
712 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
713 msgid ""
714 "The value assigned to this environment variable should be a single digit, "
715 "whose meaning is as described for B<M_CHECK_ACTION>. Any characters beyond "
716 "the initial digit are ignored."
717 msgstr ""
718
719 #. type: Plain text
720 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
721 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
722 msgid ""
723 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
724 "for set-user-ID and set-group-ID programs. However, if the file I</etc/suid-"
725 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
726 "also has an effect for set-user-ID and set-group-ID programs."
727 msgstr ""
728
729 #. type: TP
730 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
731 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
732 #, no-wrap
733 msgid "B<MALLOC_MMAP_MAX_>"
734 msgstr ""
735
736 #. type: Plain text
737 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
738 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
739 msgid "Controls the same parameter as B<mallopt>() B<M_MMAP_MAX>."
740 msgstr ""
741
742 #. type: TP
743 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
744 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
745 #, no-wrap
746 msgid "B<MALLOC_MMAP_THRESHOLD_>"
747 msgstr ""
748
749 #. type: Plain text
750 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
751 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
752 msgid "Controls the same parameter as B<mallopt>() B<M_MMAP_THRESHOLD>."
753 msgstr ""
754
755 #. type: TP
756 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
757 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
758 #, no-wrap
759 msgid "B<MALLOC_PERTURB_>"
760 msgstr ""
761
762 #. type: Plain text
763 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
764 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
765 msgid "Controls the same parameter as B<mallopt>() B<M_PERTURB>."
766 msgstr ""
767
768 #. type: TP
769 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
770 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
771 #, no-wrap
772 msgid "B<MALLOC_TRIM_THRESHOLD_>"
773 msgstr ""
774
775 #. type: Plain text
776 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
777 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
778 msgid "Controls the same parameter as B<mallopt>() B<M_TRIM_THRESHOLD>."
779 msgstr ""
780
781 #. type: TP
782 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
783 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
784 #, no-wrap
785 msgid "B<MALLOC_TOP_PAD_>"
786 msgstr ""
787
788 #. type: Plain text
789 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
790 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
791 msgid "Controls the same parameter as B<mallopt>() B<M_TOP_PAD>."
792 msgstr ""
793
794 #. type: SH
795 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
796 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
797 #, no-wrap
798 msgid "RETURN VALUE"
799 msgstr ""
800
801 #. type: Plain text
802 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
803 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
804 msgid "On success, B<mallopt>() returns 1. On error, it returns 0."
805 msgstr ""
806
807 #. type: SH
808 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
809 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
810 #, no-wrap
811 msgid "ERRORS"
812 msgstr ""
813
814 #. type: Plain text
815 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
816 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
817 msgid "On error, I<errno> is I<not> set."
818 msgstr ""
819
820 #. type: SH
821 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
822 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
823 #, no-wrap
824 msgid "VERSIONS"
825 msgstr ""
826
827 #. type: Plain text
828 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
829 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
830 msgid ""
831 "A similar function exists on many System V derivatives, but the range of "
832 "values for I<param> varies across systems. The SVID defined options "
833 "B<M_MXFAST>, B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of "
834 "these is implemented in glibc."
835 msgstr ""
836
837 #. type: SH
838 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
839 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
840 #, no-wrap
841 msgid "STANDARDS"
842 msgstr ""
843
844 #. type: Plain text
845 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
846 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
847 msgid "None."
848 msgstr ""
849
850 #. type: SH
851 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
852 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
853 #, no-wrap
854 msgid "HISTORY"
855 msgstr ""
856
857 #. type: Plain text
858 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
859 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
860 msgid "glibc 2.0."
861 msgstr ""
862
863 #. type: SH
864 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
865 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
866 #, no-wrap
867 msgid "BUGS"
868 msgstr ""
869
870 #. type: Plain text
871 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
872 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
873 msgid "Specifying an invalid value for I<param> does not generate an error."
874 msgstr ""
875
876 #. FIXME . This looks buggy:
877 #. setting the M_MXFAST limit rounds up: (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
878 #. malloc requests are rounded up:
879 #. (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
880 #. https://www.sourceware.org/bugzilla/show_bug.cgi?id=12129
881 #. type: Plain text
882 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
883 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
884 msgid ""
885 "A calculation error within the glibc implementation means that a call of the "
886 "form:"
887 msgstr ""
888
889 #. type: Plain text
890 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
891 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
892 #, no-wrap
893 msgid "mallopt(M_MXFAST, n)\n"
894 msgstr ""
895
896 #. Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
897 #. type: Plain text
898 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
899 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
900 msgid ""
901 "does not result in fastbins being employed for all allocations of size up to "
902 "I<n>. To ensure desired results, I<n> should be rounded up to the next "
903 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
904 "integer."
905 msgstr ""
906
907 #. FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12140
908 #. type: Plain text
909 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
910 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
911 msgid ""
912 "If B<mallopt>() is used to set B<M_PERTURB>, then, as expected, the bytes "
913 "of allocated memory are initialized to the complement of the byte in "
914 "I<value>, and when that memory is freed, the bytes of the region are "
915 "initialized to the byte specified in I<value>. However, there is an off-by-"
916 "I<sizeof(size_t)> error in the implementation: instead of initializing "
917 "precisely the block of memory being freed by the call I<free(p)>, the block "
918 "starting at I<p+sizeof(size_t)> is initialized."
919 msgstr ""
920
921 #. type: SH
922 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
923 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
924 #, no-wrap
925 msgid "EXAMPLES"
926 msgstr ""
927
928 #. type: Plain text
929 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
930 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
931 msgid ""
932 "The program below demonstrates the use of B<M_CHECK_ACTION>. If the program "
933 "is supplied with an (integer) command-line argument, then that argument is "
934 "used to set the B<M_CHECK_ACTION> parameter. The program then allocates a "
935 "block of memory, and frees it twice (an error)."
936 msgstr ""
937
938 #. type: Plain text
939 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
940 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
941 msgid ""
942 "The following shell session shows what happens when we run this program "
943 "under glibc, with the default value for B<M_CHECK_ACTION>:"
944 msgstr ""
945
946 #. type: Plain text
947 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
948 #: opensuse-tumbleweed
949 #, no-wrap
950 msgid ""
951 "$B< ./a.out>;\n"
952 "main(): returned from first free() call\n"
953 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
954 "======= Backtrace: =========\n"
955 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
956 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
957 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
958 "\\&./a.out[0x80485db]\n"
959 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
960 "\\&./a.out[0x8048471]\n"
961 "======= Memory map: ========\n"
962 "001e4000-001fe000 r-xp 00000000 08:06 1083555 /lib/libgcc_s.so.1\n"
963 "001fe000-001ff000 r--p 00019000 08:06 1083555 /lib/libgcc_s.so.1\n"
964 "[some lines omitted]\n"
965 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
966 "bff53000-bff74000 rw-p 00000000 00:00 0 [stack]\n"
967 "Aborted (core dumped)\n"
968 msgstr ""
969
970 #. type: Plain text
971 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
972 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
973 msgid ""
974 "The following runs show the results when employing other values for "
975 "B<M_CHECK_ACTION>:"
976 msgstr ""
977
978 #. type: Plain text
979 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
980 #: opensuse-tumbleweed
981 #, no-wrap
982 msgid ""
983 "$B< ./a.out 1>; # Diagnose error and continue\n"
984 "main(): returned from first free() call\n"
985 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
986 "main(): returned from second free() call\n"
987 "$B< ./a.out 2>; # Abort without error message\n"
988 "main(): returned from first free() call\n"
989 "Aborted (core dumped)\n"
990 "$B< ./a.out 0>; # Ignore error and continue\n"
991 "main(): returned from first free() call\n"
992 "main(): returned from second free() call\n"
993 msgstr ""
994
995 #. type: Plain text
996 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
997 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
998 msgid ""
999 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
1000 "environment variable:"
1001 msgstr ""
1002
1003 #. type: Plain text
1004 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1005 #: opensuse-tumbleweed
1006 #, no-wrap
1007 msgid ""
1008 "$B< MALLOC_CHECK_=1 ./a.out>;\n"
1009 "main(): returned from first free() call\n"
1010 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
1011 "main(): returned from second free() call\n"
1012 msgstr ""
1013
1014 #. type: SS
1015 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1016 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1017 #, no-wrap
1018 msgid "Program source"
1019 msgstr ""
1020
1021 #. type: Plain text
1022 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1023 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1024 #, no-wrap
1025 msgid ""
1026 "#include E<lt>malloc.hE<gt>\n"
1027 "#include E<lt>stdio.hE<gt>\n"
1028 "#include E<lt>stdlib.hE<gt>\n"
1029 "\\&\n"
1030 "int\n"
1031 "main(int argc, char *argv[])\n"
1032 "{\n"
1033 " char *p;\n"
1034 "\\&\n"
1035 " if (argc E<gt> 1) {\n"
1036 " if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
1037 " fprintf(stderr, \"mallopt() failed\");\n"
1038 " exit(EXIT_FAILURE);\n"
1039 " }\n"
1040 " }\n"
1041 "\\&\n"
1042 " p = malloc(1000);\n"
1043 " if (p == NULL) {\n"
1044 " fprintf(stderr, \"malloc() failed\");\n"
1045 " exit(EXIT_FAILURE);\n"
1046 " }\n"
1047 "\\&\n"
1048 " free(p);\n"
1049 " printf(\"%s(): returned from first free() call\\[rs]n\", __func__);\n"
1050 "\\&\n"
1051 " free(p);\n"
1052 " printf(\"%s(): returned from second free() call\\[rs]n\", __func__);\n"
1053 "\\&\n"
1054 " exit(EXIT_SUCCESS);\n"
1055 "}\n"
1056 msgstr ""
1057
1058 #. SRC END
1059 #. type: SH
1060 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1061 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1062 #, no-wrap
1063 msgid "SEE ALSO"
1064 msgstr ""
1065
1066 #. type: Plain text
1067 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1068 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1069 msgid ""
1070 "B<mmap>(2), B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
1071 "B<malloc_info>(3), B<malloc_stats>(3), B<malloc_trim>(3), B<mcheck>(3), "
1072 "B<mtrace>(3), B<posix_memalign>(3)"
1073 msgstr ""
1074
1075 #. type: TH
1076 #: debian-trixie
1077 #, no-wrap
1078 msgid "2024-06-15"
1079 msgstr ""
1080
1081 #. type: TH
1082 #: debian-trixie
1083 #, no-wrap
1084 msgid "Linux man-pages 6.9.1"
1085 msgstr ""
1086
1087 #. type: Plain text
1088 #: debian-trixie
1089 msgid "Standard C library (I<libc>, I<-lc>)"
1090 msgstr ""
1091
1092 #. type: Plain text
1093 #: debian-trixie fedora-44 fedora-rawhide
1094 #, no-wrap
1095 msgid ""
1096 "$ B<./a.out>\n"
1097 "main(): returned from first free() call\n"
1098 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
1099 "======= Backtrace: =========\n"
1100 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
1101 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
1102 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
1103 "\\&./a.out[0x80485db]\n"
1104 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
1105 "\\&./a.out[0x8048471]\n"
1106 "======= Memory map: ========\n"
1107 "001e4000-001fe000 r-xp 00000000 08:06 1083555 /lib/libgcc_s.so.1\n"
1108 "001fe000-001ff000 r--p 00019000 08:06 1083555 /lib/libgcc_s.so.1\n"
1109 "[some lines omitted]\n"
1110 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
1111 "bff53000-bff74000 rw-p 00000000 00:00 0 [stack]\n"
1112 "Aborted (core dumped)\n"
1113 msgstr ""
1114
1115 #. type: Plain text
1116 #: debian-trixie fedora-44 fedora-rawhide
1117 #, no-wrap
1118 msgid ""
1119 "$ B<./a.out 1> # Diagnose error and continue\n"
1120 "main(): returned from first free() call\n"
1121 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
1122 "main(): returned from second free() call\n"
1123 "$ B<./a.out 2> # Abort without error message\n"
1124 "main(): returned from first free() call\n"
1125 "Aborted (core dumped)\n"
1126 "$ B<./a.out 0> # Ignore error and continue\n"
1127 "main(): returned from first free() call\n"
1128 "main(): returned from second free() call\n"
1129 msgstr ""
1130
1131 #. type: Plain text
1132 #: debian-trixie fedora-44 fedora-rawhide
1133 #, no-wrap
1134 msgid ""
1135 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
1136 "main(): returned from first free() call\n"
1137 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
1138 "main(): returned from second free() call\n"
1139 msgstr ""
1140
1141 #. type: TH
1142 #: fedora-44 fedora-rawhide
1143 #, no-wrap
1144 msgid "2024-07-23"
1145 msgstr ""
1146
1147 #. type: TH
1148 #: fedora-44 fedora-rawhide
1149 #, no-wrap
1150 msgid "Linux man-pages 6.13"
1151 msgstr ""
1152
1153 #. type: TH
1154 #: mageia-cauldron
1155 #, no-wrap
1156 msgid "Linux man-pages 6.17"
1157 msgstr ""
1158
1159 #. type: TH
1160 #: opensuse-leap-16-1 opensuse-tumbleweed
1161 #, no-wrap
1162 msgid "Linux man-pages (unreleased)"
1163 msgstr ""