Debian Codegraph @

po/de/man3/malloc.3.po

raw
1 # German translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Martin Eberhard Schauer <[email protected]>, 2012.
5 # Mario Blättermann <[email protected]>, 2014.
6 # Helge Kreutzmann <[email protected]>, 2017, 2019-2023, 2025.
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: manpages-l10n 4.30.2\n"
10 "POT-Creation-Date: 2026-06-05 06:30+0200\n"
11 "PO-Revision-Date: 2026-06-05 14:46+0200\n"
12 "Last-Translator: Helge Kreutzmann <[email protected]>\n"
13 "Language-Team: German <[email protected]>\n"
14 "Language: de\n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18 "Plural-Forms: nplurals=2; plural=n != 1;\n"
19
20 #. type: TH
21 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
22 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
23 #, no-wrap
24 msgid "malloc"
25 msgstr "malloc"
26
27 #. type: TH
28 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
29 #: opensuse-tumbleweed
30 #, no-wrap
31 msgid "2026-02-08"
32 msgstr "8. Februar 2026"
33
34 #. type: TH
35 #: archlinux debian-unstable
36 #, no-wrap
37 msgid "Linux man-pages 6.18"
38 msgstr "Linux man-pages 6.18"
39
40 #. type: SH
41 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
42 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
43 #, no-wrap
44 msgid "NAME"
45 msgstr "BEZEICHNUNG"
46
47 #. type: Plain text
48 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
49 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
50 msgid ""
51 "malloc, free, calloc, realloc, reallocarray - allocate and free dynamic "
52 "memory"
53 msgstr ""
54 "malloc, free, calloc, realloc, reallocarray - dynamischen Speicher belegen "
55 "und freigeben"
56
57 #. type: SH
58 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
59 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
60 #, no-wrap
61 msgid "LIBRARY"
62 msgstr "BIBLIOTHEK"
63
64 #. type: Plain text
65 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
66 #: opensuse-leap-16-1 opensuse-tumbleweed
67 msgid "Standard C library (I<libc>,\\ I<-lc>)"
68 msgstr "Standard-C-Bibliothek (I<libc>,\\ I<-lc>)"
69
70 #. type: SH
71 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
72 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
73 #, no-wrap
74 msgid "SYNOPSIS"
75 msgstr "ÜBERSICHT"
76
77 #. type: Plain text
78 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
79 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
80 #, no-wrap
81 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
82 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
83
84 #. type: Plain text
85 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
86 #: opensuse-tumbleweed
87 #, no-wrap
88 msgid ""
89 "B<void *malloc(size_t >I<size>B<);>\n"
90 "B<void free(void *_Nullable >I<p>B<);>\n"
91 "B<void *calloc(size_t >I<n>B<, size_t >I<size>B<);>\n"
92 "B<void *realloc(void *_Nullable >I<p>B<, size_t >I<size>B<);>\n"
93 "B<void *reallocarray(void *_Nullable >I<p>B<, size_t >I<n>B<, size_t >I<size>B<);>\n"
94 msgstr ""
95 "B<void *malloc(size_t >I<Größe>B<);>\n"
96 "B<void free(void *_Nullable >I<z>B<);>\n"
97 "B<void *calloc(size_t >I<n>B<, size_t >I<Größe>B<);>\n"
98 "B<void *realloc(void *_Nullable >I<z>B<, size_t >I<Größe>B<);>\n"
99 "B<void *reallocarray(void *_Nullable >I<z>B<, size_t >I<n>B<, size_t >I<Größe>B<);>\n"
100
101 #. type: Plain text
102 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
103 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
104 msgid ""
105 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
106 msgstr ""
107 "Mit Glibc erforderliche Feature-Test-Makros (siehe "
108 "B<feature_test_macros>(7)):"
109
110 #. type: Plain text
111 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
112 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
113 msgid "B<reallocarray>():"
114 msgstr "B<reallocarray>():"
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 #, no-wrap
120 msgid ""
121 " Since glibc 2.29:\n"
122 " _DEFAULT_SOURCE\n"
123 " glibc 2.28 and earlier:\n"
124 " _GNU_SOURCE\n"
125 msgstr ""
126 " Seit Glibc 2.29:\n"
127 " _DEFAULT_SOURCE\n"
128 " Glibc 2.28 und älter:\n"
129 " _GNU_SOURCE\n"
130
131 #. type: SH
132 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
133 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
134 #, no-wrap
135 msgid "DESCRIPTION"
136 msgstr "BESCHREIBUNG"
137
138 #. type: SS
139 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
140 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
141 #, no-wrap
142 msgid "malloc()"
143 msgstr "malloc()"
144
145 #. type: Plain text
146 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
147 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
148 msgid ""
149 "The B<malloc>() function allocates I<size> bytes and returns a pointer to "
150 "the allocated memory. I<The memory is not initialized>. If I<size> is 0, "
151 "then B<malloc>() returns a unique pointer value that can later be "
152 "successfully passed to B<free>(). (See \"Nonportable behavior\" for "
153 "portability issues.)"
154 msgstr ""
155 "Die Funktion B<malloc>() belegt I<Größe> Byte und gibt einen Zeiger auf den "
156 "belegten Speicherbereich zurück. I<Der Speicher wird nicht initialisiert>. "
157 "Falls I<Größe> 0 ist, wird B<malloc>() einen eindeutigen Zeigerwert "
158 "zurückgeben, der später erfolgreich an B<free>() übergeben werden kann. "
159 "(Siehe »Nichtportables Verhalten« für Portabilitäts-Probleme.)"
160
161 #. type: SS
162 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
163 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
164 #, no-wrap
165 msgid "free()"
166 msgstr "free()"
167
168 #. type: Plain text
169 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
170 #: opensuse-tumbleweed
171 msgid ""
172 "The B<free>() function frees the memory space pointed to by I<p>, which "
173 "must have been returned by a previous call to B<malloc>() or related "
174 "functions. Otherwise, or if I<p> has already been freed, undefined behavior "
175 "occurs. If I<p> is NULL, no operation is performed."
176 msgstr ""
177 "B<free>() gibt den Speicher frei, auf den I<z> zeigt, welcher von einem "
178 "früheren Aufruf von B<malloc>() oder verwandten Funktionen belegt worden "
179 "sein muss. Andernfalls oder wenn I<z> bereits freigegeben wurde, ist das "
180 "Verhalten nicht definiert. Wenn I<z> NULL ist, wird keine Operation "
181 "ausgeführt."
182
183 #. type: SS
184 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
185 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
186 #, no-wrap
187 msgid "calloc()"
188 msgstr "calloc()"
189
190 #. type: Plain text
191 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
192 #: opensuse-leap-16-1 opensuse-tumbleweed
193 msgid ""
194 "The B<calloc>() function allocates memory for an array of I<n> elements of "
195 "I<size> bytes each and returns a pointer to the allocated memory. The "
196 "memory is set to zero. If I<n> or I<size> is 0, then B<calloc>() returns a "
197 "unique pointer value that can later be successfully passed to B<free>()."
198 msgstr ""
199 "Die Funktion B<calloc>() belegt Speicher für ein Feld von I<n> Elementen der "
200 "jeweiligen Größe I<Größe> und liefert einen Zeiger auf den belegten Speicher "
201 "zurück. Der Speicher wird auf 0 gesetzt. Falls I<n> oder I<Größe> 0 ist, "
202 "wird B<calloc>() einen eindeutigen Zeigerwert zurückgeben, der später "
203 "erfolgreich an B<free>() übergeben werden kann."
204
205 #. type: Plain text
206 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
207 #: opensuse-leap-16-1 opensuse-tumbleweed
208 msgid ""
209 "If the multiplication of I<n> and I<size> would result in integer overflow, "
210 "then B<calloc>() returns an error. By contrast, an integer overflow would "
211 "not be detected in the following call to B<malloc>(), with the result that "
212 "an incorrectly sized block of memory would be allocated:"
213 msgstr ""
214 "Falls die Multiplikation von I<n> und I<Größe> zu einem Ganzzahlüberlauf "
215 "führen würde, dann liefert B<calloc>() einen Fehler zurück. Im Gegensatz "
216 "dazu würde ein Ganzzahlüberlauf in dem nachfolgenden Aufruf von B<malloc>() "
217 "nicht erkannt werden, was zu einer Zuweisung eines Speicherblocks mit "
218 "falscher Größe führen würde:"
219
220 #. type: Plain text
221 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
222 #: opensuse-leap-16-1 opensuse-tumbleweed
223 #, no-wrap
224 msgid "malloc(n * size);\n"
225 msgstr "malloc(n * Größe);\n"
226
227 #. type: SS
228 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
229 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
230 #, no-wrap
231 msgid "realloc()"
232 msgstr "realloc()"
233
234 #. type: Plain text
235 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
236 #: opensuse-tumbleweed
237 msgid ""
238 "The B<realloc>() function changes the size of the memory block pointed to "
239 "by I<p> to I<size> bytes. The contents of the memory will be unchanged in "
240 "the range from the start of the region up to the minimum of the old and new "
241 "sizes. If the new size is larger than the old size, the added memory will "
242 "I<not> be initialized."
243 msgstr ""
244 "B<realloc>() ändert die Größe des Speicherblocks, auf den I<z> zeigt, auf "
245 "I<Größe> Byte. Der Inhalt des Speichers bleibt im Bereich vom Anfang des "
246 "Speicherbereichs bis zum Minimum von alter und neuer Größe unverändert. "
247 "Falls die neue Größe die alte überschreitet, wird der zusätzliche Speicher "
248 "I<nicht> initialisiert."
249
250 #. type: Plain text
251 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
252 #: opensuse-tumbleweed
253 msgid ""
254 "If I<p> is NULL, then the call is equivalent to I<malloc(size)>, for all "
255 "values of I<size>."
256 msgstr ""
257 "Falls I<z> gleich NULL ist, ist der Aufruf äquivalent zu I<malloc(Größe)>."
258
259 #. type: Plain text
260 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
261 #: opensuse-tumbleweed
262 msgid ""
263 "If I<size> is equal to zero, and I<p> is not NULL, then the call is "
264 "equivalent to I<free(p)> (but see \"Nonportable behavior\" for portability "
265 "issues)."
266 msgstr ""
267 "falls die Größe gleich Null und I<z> von NULL verschieden ist, ist der "
268 "Aufruf äquivalent zu I<free(z)> (siehe aber »Nichtportables Verhalten« für "
269 "Portabilitäts-Probleme.)"
270
271 #. type: Plain text
272 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
273 #: opensuse-tumbleweed
274 msgid ""
275 "Unless I<p> is NULL, it must have been returned by an earlier call to "
276 "B<malloc> or related functions. If the area pointed to was moved, a "
277 "I<free(p)> is done."
278 msgstr ""
279 "Wenn I<z> nicht NULL ist, muss er von einem früheren Aufruf von B<malloc>() "
280 "oder verwandten Funktionen zurückgegeben worden sein. Falls der Bereich, auf "
281 "den verwiesen wurde, verschoben wurde, wird I<free(z)> aufgerufen."
282
283 #. type: SS
284 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
285 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
286 #, no-wrap
287 msgid "reallocarray()"
288 msgstr "reallocarray()"
289
290 #. type: Plain text
291 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
292 #: opensuse-tumbleweed
293 msgid ""
294 "The B<reallocarray>() function changes the size of (and possibly moves) "
295 "the memory block pointed to by I<p> to be large enough for an array of I<n> "
296 "elements, each of which is I<size> bytes. It is equivalent to the call"
297 msgstr ""
298 "Die Funktion B<reallocarray>() ändert die Größe des Speicherblocks, auf den "
299 "I<z> zeigt, (und verschiebt ihn möglicherweise,) damit er groß genug für ein "
300 "Feld von I<n> Elementen mit jeweils I<Größe> Byte ist. Sie ist äquivalent zu "
301 "dem Aufruf:"
302
303 #. type: Plain text
304 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
305 #: opensuse-tumbleweed
306 #, no-wrap
307 msgid "realloc(p, n * size);\n"
308 msgstr "realloc(z, n * Größe);\n"
309
310 #. type: Plain text
311 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
312 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
313 msgid ""
314 "However, unlike that B<realloc>() call, B<reallocarray>() fails safely in "
315 "the case where the multiplication would overflow. If such an overflow "
316 "occurs, B<reallocarray>() returns an error."
317 msgstr ""
318 "Allerdings schlägt B<reallocarray>(), anders als obiger Aufruf von "
319 "B<realloc>(), sicher fehl, wenn die Multiplikation überliefe. Falls solch "
320 "ein Überlauf auftritt, liefert B<reallocarray>() einen Fehler zurück."
321
322 #. type: SH
323 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
324 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
325 #, no-wrap
326 msgid "RETURN VALUE"
327 msgstr "RÜCKGABEWERT"
328
329 #. type: Plain text
330 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
331 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
332 msgid ""
333 "The B<malloc>(), B<calloc>(), B<realloc>(), and B<reallocarray>() functions "
334 "return a pointer to the allocated memory, which is suitably aligned for any "
335 "type that fits into the requested size or less. On error, these functions "
336 "return NULL and set I<errno>. Attempting to allocate more than "
337 "B<PTRDIFF_MAX> bytes is considered an error, as an object that large could "
338 "cause later pointer subtraction to overflow."
339 msgstr ""
340 "Die Funktionen B<malloc>(), B<calloc>(), B<realloc>() und B<reallocarray>() "
341 "liefern einen Zeiger auf den reservierten Speicher, der geeignet für jeden "
342 "Typ, der in die angeforderte Größe oder weniger passt, ausgerichtet ist. "
343 "Tritt ein Fehler auf, geben diese Funktionen NULL zurück und setzen "
344 "I<errno>. Versuche, mehr als B<PTRDIFF_MAX> byte zu belegen, wird als ein "
345 "Fehler betrachtet, da ein Objekt dieser Größe bei späterer Zeigersubtraktion "
346 "zu einem Überlauf führen könnte."
347
348 #. type: Plain text
349 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
350 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
351 msgid "The B<free>() function returns no value, and preserves I<errno>."
352 msgstr "Die Funktion B<free>() gibt keinen Wert zurück und erhält I<errno>."
353
354 #. type: Plain text
355 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
356 #: opensuse-tumbleweed
357 msgid ""
358 "The B<realloc>() and B<reallocarray>() functions return NULL if I<p> is "
359 "not NULL and the requested size is zero; this is not considered an error. "
360 "(See \"Nonportable behavior\" for portability issues.) Otherwise, the "
361 "returned pointer may be the same as I<p> if the allocation was not moved "
362 "(e.g., there was room to expand the allocation in-place), or different from "
363 "I<p> if the allocation was moved to a new address. If these functions fail, "
364 "the original block is left untouched; it is not freed or moved."
365 msgstr ""
366 "Die Funktionen B<realloc>() und B<reallocarray>() liefern NULL zurück, falls "
367 "I<z> nicht NULL ist und die angeforderte Größe Null ist; dies wird nicht als "
368 "Fehler betrachtet. (Siehe »Nichtportables Verhalten« für Portabilitäts-"
369 "Probleme.) Andernfalls kann der zurückgelieferte Zeiger zu I<z> identisch "
370 "sein, falls die Belegung nicht verschoben wurde (z.B. weil genug Platz "
371 "vorhanden war, um die Belegung am Ort selbst zu vergrößern) oder sich von "
372 "I<z> unterscheiden, falls die Belegung an eine neue Adresse verschoben "
373 "wurde. Wenn diese Funktionen scheitern, bleibt der ursprüngliche Block "
374 "unverändert - er wird nicht freigegeben oder verschoben."
375
376 #. type: SH
377 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
378 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
379 #, no-wrap
380 msgid "ERRORS"
381 msgstr "FEHLER"
382
383 #. type: Plain text
384 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
385 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
386 msgid ""
387 "B<calloc>(), B<malloc>(), B<realloc>(), and B<reallocarray>() can fail with "
388 "the following error:"
389 msgstr ""
390 "B<calloc>(), B<malloc>(), B<realloc>() und B<reallocarray>() können mit den "
391 "folgenden Fehlern fehlschlagen:"
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<ENOMEM>"
398 msgstr "B<ENOMEM>"
399
400 #. type: Plain text
401 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
402 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
403 msgid ""
404 "Out of memory. Possibly, the application hit the B<RLIMIT_AS> or "
405 "B<RLIMIT_DATA> limit described in B<getrlimit>(2). Another reason could be "
406 "that the number of mappings created by the caller process exceeded the limit "
407 "specified by I</proc/sys/vm/max_map_count>."
408 msgstr ""
409 "Speicher erschöpft. Möglicherweise erreichte die Anwendung die in "
410 "B<getrlimit>(2) beschriebene Grenze B<RLIMIT_AS> oder B<RLIMIT_DATA>. Ein "
411 "anderer Grund könnte sein, dass die Anzahl der durch den aufrufenden Prozess "
412 "erstellten Mappings die durch I</proc/sys/vm/max_map_count> festgelegte "
413 "Grenze überschritten hat."
414
415 #. type: SH
416 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
417 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
418 #, no-wrap
419 msgid "ATTRIBUTES"
420 msgstr "ATTRIBUTE"
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 "For an explanation of the terms used in this section, see B<attributes>(7)."
427 msgstr ""
428 "Siehe B<attributes>(7) für eine Erläuterung der in diesem Abschnitt "
429 "verwandten Ausdrücke."
430
431 #. type: tbl table
432 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
433 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
434 #, no-wrap
435 msgid "Interface"
436 msgstr "Schnittstelle"
437
438 #. type: tbl table
439 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
440 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
441 #, no-wrap
442 msgid "Attribute"
443 msgstr "Attribut"
444
445 #. type: tbl table
446 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
447 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
448 #, no-wrap
449 msgid "Value"
450 msgstr "Wert"
451
452 #. type: tbl table
453 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
454 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
455 #, no-wrap
456 msgid ".na\n"
457 msgstr ".na\n"
458
459 #. type: tbl table
460 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
461 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
462 #, no-wrap
463 msgid ".nh\n"
464 msgstr ".nh\n"
465
466 #. type: tbl table
467 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
468 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
469 #, no-wrap
470 msgid ""
471 "B<malloc>(),\n"
472 "B<free>(),\n"
473 "B<calloc>(),\n"
474 "B<realloc>()"
475 msgstr ""
476 "B<malloc>(),\n"
477 "B<free>(),\n"
478 "B<calloc>(),\n"
479 "B<realloc>()"
480
481 #. type: tbl table
482 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
483 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
484 #, no-wrap
485 msgid "Thread safety"
486 msgstr "Multithread-Fähigkeit"
487
488 #. type: tbl table
489 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
490 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
491 #, no-wrap
492 msgid "MT-Safe"
493 msgstr "MT-Sicher"
494
495 #. type: SH
496 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
497 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
498 #, no-wrap
499 msgid "STANDARDS"
500 msgstr "STANDARDS"
501
502 #. type: TP
503 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
504 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
505 #, no-wrap
506 msgid "B<malloc>()"
507 msgstr "B<malloc>()"
508
509 #. type: TQ
510 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
511 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
512 #, no-wrap
513 msgid "B<free>()"
514 msgstr "B<free>()"
515
516 #. type: TQ
517 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
518 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
519 #, no-wrap
520 msgid "B<calloc>()"
521 msgstr "B<calloc>()"
522
523 #. type: TQ
524 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
525 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
526 #, no-wrap
527 msgid "B<realloc>()"
528 msgstr "B<realloc>()"
529
530 #. type: Plain text
531 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
532 #: opensuse-tumbleweed
533 msgid "C23, POSIX.1-2024."
534 msgstr "C23, POSIX.1-2024."
535
536 #. type: TP
537 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
538 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
539 #, no-wrap
540 msgid "B<reallocarray>()"
541 msgstr "B<reallocarray>()"
542
543 #. type: Plain text
544 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
545 #: opensuse-tumbleweed
546 msgid "POSIX.1-2024."
547 msgstr "POSIX.1-2024."
548
549 #. type: SS
550 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
551 #: opensuse-tumbleweed
552 #, no-wrap
553 msgid "realloc(p, 0)"
554 msgstr "realloc(p, 0)"
555
556 #. type: Plain text
557 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
558 #: opensuse-tumbleweed
559 msgid ""
560 "The behavior of I<realloc(p,\\ 0)> in glibc doesn't conform to any of C99, "
561 "C11, POSIX.1-2001, POSIX.1-2004, POSIX.1-2008, POSIX.1-2013, POSIX.1-2017, "
562 "or POSIX.1-2024. The C17 specification was changed to make it conforming, "
563 "but that specification made it impossible to write code that reliably "
564 "determines if the input pointer is freed after I<realloc(p,\\ 0)>, and C23 "
565 "changed it again to make this undefined behavior, acknowledging that the C17 "
566 "specification was broad enough, so that undefined behavior wasn't worse than "
567 "that."
568 msgstr ""
569 "Das Verhalten von I<realloc(p,\\ 0)> in Glibc ist weder zu C99, C11, "
570 "POSIX.1-2001, POSIX.1-2004, POSIX.1-2008, POSIX.1-2013, POSIX.1-2017, noch "
571 "POSIX.1-2024 konform. Die C17-Spezifikation wurde geändert, damit sie "
572 "konform wurde, aber diese Spezifikation machte es unmöglich Code zu "
573 "schreiben, der zuverlässig bestimmt, ob der Eingabezeiger nach I<realloc(p,"
574 "\\ 0)> freigegeben wurde und C23 änderte es wieder, um dies als "
575 "undefiniertes Verhalten festzulegen. Damit wurde zugegeben, dass die C17-"
576 "Spezifikation allgemein genug war, so dass das undefinierte Verhalten nicht "
577 "schlechter als das war."
578
579 #. type: Plain text
580 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
581 #: opensuse-tumbleweed
582 msgid "B<reallocarray>() suffers the same issues in glibc."
583 msgstr "B<reallocarray>() leidet unter den gleichen Problemen in Glibc."
584
585 #. type: Plain text
586 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
587 #: opensuse-tumbleweed
588 msgid "musl libc and the BSDs conform to all versions of ISO C and POSIX.1."
589 msgstr ""
590 "Musl Libc und die BSDs sind zu allen Versionen von ISO C und POSIX.1 konform."
591
592 #. type: Plain text
593 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
594 #: opensuse-tumbleweed
595 msgid ""
596 "gnulib provides the I<realloc-posix> module, which provides wrappers "
597 "B<realloc>() and B<reallocarray>() that conform to all versions of ISO C "
598 "and POSIX.1."
599 msgstr ""
600 "Glibc stellt das Modul I<realloc-posix> bereit, das die Wrapper B<realloc>() "
601 "und B<reallocarray>() bereitstellt, die zu allen Versionen von ISO C und "
602 "POSIX.1 konform sind."
603
604 #. type: Plain text
605 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
606 #: opensuse-tumbleweed
607 msgid ""
608 "There's a proposal to standardize the BSD behavior: E<.UR https:\\://"
609 "www.open-std.org/\\:jtc1/\\:sc22/\\:wg14/\\:www/\\:docs/\\:n3621.txt> "
610 "E<.UE .>"
611 msgstr ""
612 "Es gibt einen Vorschlag, das BSD-Verhalten zu normen: E<.UR https:\\://"
613 "www.open-std.org/\\:jtc1/\\:sc22/\\:wg14/\\:www/\\:docs/\\:n3621.txt> "
614 "E<.UE .>"
615
616 #. type: SH
617 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
618 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
619 #, no-wrap
620 msgid "HISTORY"
621 msgstr "GESCHICHTE"
622
623 #. type: Plain text
624 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
625 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
626 msgid "POSIX.1-2001, C89."
627 msgstr "POSIX.1-2001, C89."
628
629 #. type: Plain text
630 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
631 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
632 msgid "glibc 2.26. OpenBSD 5.6, FreeBSD 11.0."
633 msgstr "Glibc 2.26. OpenBSD 5.6, FreeBSD 11.0."
634
635 #. type: Plain text
636 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
637 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
638 msgid ""
639 "B<malloc>() and related functions rejected sizes greater than "
640 "B<PTRDIFF_MAX> starting in glibc 2.30."
641 msgstr ""
642 "B<malloc>() und verwandte Funktionen lehnen seit Glibc 2.30 Größen größer "
643 "als B<PTRDIFF_MAX> ab."
644
645 #. type: Plain text
646 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
647 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
648 msgid "B<free>() preserved I<errno> starting in glibc 2.33."
649 msgstr "Seit Glibc 2.33 erhält B<free>() I<errno>."
650
651 #. type: SS
652 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
653 #: opensuse-tumbleweed
654 #, no-wrap
655 msgid "realloc(p,\\ 0)"
656 msgstr "realloc(p,\\ 0)"
657
658 #. type: Plain text
659 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
660 #: opensuse-tumbleweed
661 msgid ""
662 "C89 was ambiguous in its specification of I<realloc(p,\\ 0)>. C99 partially "
663 "fixed this."
664 msgstr ""
665 "C89 war in seiner Spezifikation von I<realloc(p,\\ 0)> mehrdeutig. C99 behob "
666 "dies teilweise."
667
668 #. type: Plain text
669 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
670 #: opensuse-tumbleweed
671 msgid ""
672 "The original implementation in glibc would have been conforming to C99. "
673 "However, and ironically, trying to comply with C99 before the standard was "
674 "released, glibc changed its behavior in glibc 2.1.1 into something that "
675 "ended up not conforming to the final C99 specification (but this is debated, "
676 "as the wording of the standard seems self-contradicting)."
677 msgstr ""
678 "Die ursprüngliche Implementierung in Glibc wäre konform zu C99 gewesen. "
679 "Ironischerweise wurde allerdings versucht, C99 einzuhalten, bevor die Norm "
680 "veröffentlicht wurde und so änderte Glibc 2.1.1 sein Verhalten derart, dass "
681 "es nicht mehr zu der veröffentlichten Fassung der C99-Spezifikation konform "
682 "war (dies ist allerdings umstritten, da die Formulierung der Norm sich "
683 "selbst zu widersprechen scheint)."
684
685 #. type: SH
686 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
687 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
688 #, no-wrap
689 msgid "NOTES"
690 msgstr "ANMERKUNGEN"
691
692 #. type: Plain text
693 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
694 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
695 msgid ""
696 "By default, Linux follows an optimistic memory allocation strategy. This "
697 "means that when B<malloc>() returns non-NULL there is no guarantee that the "
698 "memory really is available. In case it turns out that the system is out of "
699 "memory, one or more processes will be killed by the OOM killer. For more "
700 "information, see the description of I</proc/sys/vm/overcommit_memory> and I</"
701 "proc/sys/vm/oom_adj> in B<proc>(5), and the Linux kernel source file "
702 "I<Documentation/vm/overcommit-accounting.rst>."
703 msgstr ""
704 "Standardmäßig verfolgt Linux eine optimistische Strategie bei der "
705 "Speicherzuweisung. Das bedeutet nicht, dass der Speicher garantiert "
706 "verfügbar ist, wenn B<malloc>() einen von NULL verschiedenen Zeiger zurück "
707 "gibt. Falls es sich herausstellt, dass das System über keinen freien "
708 "Speicher verfügt, werden ein oder mehrere Prozesse vom OOM-Killer getötet. "
709 "Für weitere Informationen siehe die Beschreibung von I</proc/sys/vm/"
710 "overcommit_memory> und I</proc/sys/vm/oom_adj> in B<proc>(5) sowie die Linux-"
711 "Kernel-Quelldatei I<Documentation/vm/overcommit-accounting.rst>."
712
713 #. type: Plain text
714 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
715 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
716 msgid ""
717 "Normally, B<malloc>() allocates memory from the heap, and adjusts the size "
718 "of the heap as required, using B<sbrk>(2). When allocating blocks of memory "
719 "larger than B<MMAP_THRESHOLD> bytes, the glibc B<malloc>() implementation "
720 "allocates the memory as a private anonymous mapping using B<mmap>(2). "
721 "B<MMAP_THRESHOLD> is 128\\ kB by default, but is adjustable using "
722 "B<mallopt>(3). Prior to Linux 4.7 allocations performed using B<mmap>(2) "
723 "were unaffected by the B<RLIMIT_DATA> resource limit; since Linux 4.7, this "
724 "limit is also enforced for allocations performed using B<mmap>(2)."
725 msgstr ""
726 "Normalerweise stellt B<malloc>() Speicher auf dem Heap bereit und passt je "
727 "nach Bedarf die Größe des Heaps mittels B<sbrk>(2) an. Bei der Zuweisung von "
728 "Speicherblöcken größer als B<MMAP_THRESHOLD> Bytes reserviert die Glibc-"
729 "Implementierung von B<malloc>() mithilfe von B<mmap>(2) den Speicher als ein "
730 "privates anonymes Mapping. B<MMAP_THRESHOLD> ist standardmäßig 128\\ kB, "
731 "kann aber mittels B<mallopt>(3) angepasst werden. Vor Linux 4.7 waren "
732 "Reservierungen unter Verwendung von B<mmap>(2) von der "
733 "Ressourcenbeschränkung B<RLIMIT_DATA> nicht betroffen; seit Linux 4.7 wird "
734 "diese Beschränkung auch bei Reservierungen mittels B<mmap>(2) durchgesetzt."
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 ""
740 "To avoid corruption in multithreaded applications, mutexes are used "
741 "internally to protect the memory-management data structures employed by "
742 "these functions. In a multithreaded application in which threads "
743 "simultaneously allocate and free memory, there could be contention for these "
744 "mutexes. To scalably handle memory allocation in multithreaded "
745 "applications, glibc creates additional I<memory allocation arenas> if mutex "
746 "contention is detected. Each arena is a large region of memory that is "
747 "internally allocated by the system (using B<brk>(2) or B<mmap>(2)), and "
748 "managed with its own mutexes."
749 msgstr ""
750 "Um Verfälschungen in Multithread-Anwendungen zu vermeiden, werden intern "
751 "Mutexe zum Schutz der Speicherverwaltungs-Datenstrukturen eingesetzt, die "
752 "von diesen Funktionen genutzt werden. In einer Multithread-Anwendung, in "
753 "denen Threads gleichzeitig Speicher zuweisen und freigeben, könnte es "
754 "Zugangskonflikte für diese Mutexe geben. Um die Speicherzuweisung in "
755 "Multithread-Anwendungen skalierbar zu bewältigen, erzeugt Glibc zusätzliche "
756 "I<memory allocation arenas>, wenn Mutex-Konflikte entdeckt wird. Jede Arena "
757 "ist eine große Speicherregion, die intern vom System (mit B<brk>(2) oder "
758 "B<mmap>(2)) zugeordnet und mit eigenen Mutexen verwaltet wird."
759
760 #. type: Plain text
761 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
762 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
763 msgid ""
764 "If your program uses a private memory allocator, it should do so by "
765 "replacing B<malloc>(), B<free>(), B<calloc>(), and B<realloc>(). The "
766 "replacement functions must implement the documented glibc behaviors, "
767 "including I<errno> handling, size-zero allocations, and overflow checking; "
768 "otherwise, other library routines may crash or operate incorrectly. For "
769 "example, if the replacement I<free>() does not preserve I<errno>, then "
770 "seemingly unrelated library routines may fail without having a valid reason "
771 "in I<errno>. Private memory allocators may also need to replace other glibc "
772 "functions; see \"Replacing malloc\" in the glibc manual for details."
773 msgstr ""
774 "Falls Ihr Programm einen privaten Speicher-Zuordner verwendet, sollte dies "
775 "so erfolgen, dass B<malloc>(), B<free>(), B<calloc>() und B<realloc>() "
776 "ersetzt werden. Die Ersatzfunktionen müssen das dokumentierte Glibc-"
777 "Verhalten implementieren, einschließlich der Handhabung von I<errno>, "
778 "Belegungen der Größe Null und der Prüfungen auf Überlauf; andernfalls "
779 "könnten andere Bibliotheksroutinen abstürzen oder falsch funktionieren. "
780 "Falls der Ersatz für I<free>() beispielsweise I<errno> nicht erhält, dann "
781 "könnten Bibliotheksfunktionen, die scheinbar keinen Bezug dazu haben, "
782 "fehlschlagen, ohne einen gültigen Grund in I<errno> anzugeben. Private "
783 "Speicher-Zuordner könnten es auch notwendig machen, andere Glibc-Funktionen "
784 "zu ersetzen; siehe »Replacing malloc« im Handbuch der Glibc für Details."
785
786 #. type: Plain text
787 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
788 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
789 msgid ""
790 "Crashes in memory allocators are almost always related to heap corruption, "
791 "such as overflowing an allocated chunk or freeing the same pointer twice."
792 msgstr ""
793 "Abstürze in Speicher-Zuordner haben nahezu immer einen Bezug zu einem "
794 "beschädigten Heap, wie z.B. eine Nutzung von mehr als dem zugeordneten "
795 "Bereich (overflowing) oder die doppelte Freigabe eines Zeigers."
796
797 #. type: Plain text
798 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
799 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
800 msgid ""
801 "The B<malloc>() implementation is tunable via environment variables; see "
802 "B<mallopt>(3) for details."
803 msgstr ""
804 "Die B<malloc>()-Implementierung kann über Umgebungsvariablen eingestellt "
805 "werden. Für Details siehe B<mallopt>(3)."
806
807 #. type: SS
808 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
809 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
810 #, no-wrap
811 msgid "Nonportable behavior"
812 msgstr "Nichtportierbares Verhalten"
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 ""
818 "The behavior of these functions when the requested size is zero is glibc "
819 "specific; other implementations may return NULL without setting I<errno>, "
820 "and portable POSIX programs should tolerate such behavior. See "
821 "B<realloc>(3p)."
822 msgstr ""
823 "Das Verhalten dieser Funktionen, wenn die angeforderte Größe Null ist, ist "
824 "Glibc-spezifisch; andere Implementierungen könnten NULL zurückliefern ohne "
825 "I<errno> zu setzen. Portierbare POSIX-Programme sollten solches Verhalten "
826 "zulassen. Siehe B<realloc>(3p)."
827
828 #. type: Plain text
829 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
830 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
831 msgid ""
832 "POSIX requires memory allocators to set I<errno> upon failure. However, the "
833 "C standard does not require this, and applications portable to non-POSIX "
834 "platforms should not assume this."
835 msgstr ""
836 "POSIX verlangt von Speicher-Zuordnern, dass sie beim Fehlschlag I<errno> "
837 "setzten. Allerdings verlangt der C-Standard dies nicht und Anwendungen, die "
838 "auf nicht-POSIX-Plattformen portierbar sein sollen, sollten dies nicht "
839 "voraussetzen."
840
841 #. type: Plain text
842 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
843 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
844 msgid ""
845 "Portable programs should not use private memory allocators, as POSIX and the "
846 "C standard do not allow replacement of B<malloc>(), B<free>(), B<calloc>(), "
847 "and B<realloc>()."
848 msgstr ""
849 "Portierbare Programme sollten keine privaten Speicher-Zuordner verwenden, da "
850 "POSIX und der C-Standard keinen Ersatz für B<malloc>(), B<free>(), "
851 "B<calloc>() und B<realloc>() erlauben."
852
853 #. type: SH
854 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
855 #: opensuse-tumbleweed
856 #, no-wrap
857 msgid "BUGS"
858 msgstr "FEHLER"
859
860 #. type: Plain text
861 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
862 #: opensuse-tumbleweed
863 msgid ""
864 "Programmers would naturally expect by induction that I<\\%realloc(p,\\ "
865 "size)> is consistent with I<free(p)> and I<malloc(size)>, as that is the "
866 "behavior in the general case. This is not explicitly required by "
867 "POSIX.1-2024 or C11, but all conforming implementations are consistent with "
868 "that."
869 msgstr ""
870 "Programmierer würden gemäß Induktion natürlicherweise erwarten, dass I<\\"
871 "%realloc(p,\\ size)> mit I<free(p)> und I<malloc(size)> konsistent ist, da "
872 "dies das Verhalten in dem allgemeinen Falle ist. Dies wird von POSIX.1-2024 "
873 "oder C11 nicht explizit verlangt, aber alle konformen Implementierungen sind "
874 "damit konsistent."
875
876 #. type: Plain text
877 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
878 #: opensuse-tumbleweed
879 msgid ""
880 "The glibc implementation of B<realloc>() is not consistent with that, and "
881 "as a consequence, it is dangerous to call I<\\%realloc(p,\\ 0)> in glibc."
882 msgstr ""
883 "Die Glibc-Implementierung von B<realloc>() ist damit nicht konsistent und "
884 "konsequenterweise ist es daher gefährlich, I<\\%realloc(p,\\ 0)> in Glibc "
885 "aufzurufen."
886
887 #. type: Plain text
888 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
889 #: opensuse-tumbleweed
890 msgid ""
891 "A trivial workaround for glibc is calling it as I<\\%realloc(p,\\ size?"
892 "size:1)>."
893 msgstr ""
894 "In Glibc kann dies trivial durch Aufruf von I<\\%realloc(p,\\ size?size:1)> "
895 "umgangen werden."
896
897 #. type: Plain text
898 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
899 #: opensuse-tumbleweed
900 msgid ""
901 "The workaround for B<reallocarray>() in glibc \\[em]which shares the same "
902 "bug\\[em] would be I<\\%reallocarray(p,\\ n?n:1,\\ size?size:1)>."
903 msgstr ""
904 "Die Vermeidung für B<reallocarray>() in Glibc \\[en]das dem gleichen Fehler "
905 "unterliegt\\[en] wäre I<\\%reallocarray(p,\\ n?n:1,\\ size?size:1)>."
906
907 #. type: SH
908 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
909 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
910 #, no-wrap
911 msgid "EXAMPLES"
912 msgstr "BEISPIELE"
913
914 #. type: Plain text
915 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
916 #: opensuse-leap-16-1 opensuse-tumbleweed
917 #, no-wrap
918 msgid ""
919 "#include E<lt>err.hE<gt>\n"
920 "#include E<lt>stddef.hE<gt>\n"
921 "#include E<lt>stdio.hE<gt>\n"
922 "#include E<lt>stdlib.hE<gt>\n"
923 "#include E<lt>string.hE<gt>\n"
924 "\\&\n"
925 "#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n"
926 "#define MALLOC(type) MALLOCARRAY(1, type)\n"
927 "\\&\n"
928 "static inline void *my_mallocarray(size_t n, size_t size);\n"
929 "\\&\n"
930 "int\n"
931 "main(void)\n"
932 "{\n"
933 " char *p;\n"
934 "\\&\n"
935 " p = MALLOCARRAY(32, char);\n"
936 " if (p == NULL)\n"
937 " err(EXIT_FAILURE, \"malloc\");\n"
938 "\\&\n"
939 " strlcpy(p, \"foo\", 32);\n"
940 " puts(p);\n"
941 "}\n"
942 "\\&\n"
943 "static inline void *\n"
944 "my_mallocarray(size_t n, size_t size)\n"
945 "{\n"
946 " return reallocarray(NULL, n, size);\n"
947 "}\n"
948 msgstr ""
949 "#include E<lt>err.hE<gt>\n"
950 "#include E<lt>stddef.hE<gt>\n"
951 "#include E<lt>stdio.hE<gt>\n"
952 "#include E<lt>stdlib.hE<gt>\n"
953 "#include E<lt>string.hE<gt>\n"
954 "\\&\n"
955 "#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n"
956 "#define MALLOC(type) MALLOCARRAY(1, type)\n"
957 "\\&\n"
958 "static inline void *my_mallocarray(size_t n, size_t size);\n"
959 "\\&\n"
960 "int\n"
961 "main(void)\n"
962 "{\n"
963 " char *p;\n"
964 "\\&\n"
965 " p = MALLOCARRAY(32, char);\n"
966 " if (p == NULL)\n"
967 " err(EXIT_FAILURE, \"malloc\");\n"
968 "\\&\n"
969 " strlcpy(p, \"foo\", 32);\n"
970 " puts(p);\n"
971 "}\n"
972 "\\&\n"
973 "static inline void *\n"
974 "my_mallocarray(size_t n, size_t size)\n"
975 "{\n"
976 " return reallocarray(NULL, n, size);\n"
977 "}\n"
978
979 #. type: SH
980 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
981 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
982 #, no-wrap
983 msgid "SEE ALSO"
984 msgstr "SIEHE AUCH"
985
986 #. type: Plain text
987 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
988 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
989 msgid ""
990 "B<valgrind>(1), B<brk>(2), B<mmap>(2), B<alloca>(3), B<malloc_get_state>(3), "
991 "B<malloc_info>(3), B<malloc_trim>(3), B<malloc_usable_size>(3), "
992 "B<mallopt>(3), B<mcheck>(3), B<mtrace>(3), B<posix_memalign>(3)"
993 msgstr ""
994 "B<valgrind>(1), B<brk>(2), B<mmap>(2), B<alloca>(3), B<malloc_get_state>(3), "
995 "B<malloc_info>(3), B<malloc_trim>(3), B<malloc_usable_size>(3), "
996 "B<mallopt>(3), B<mcheck>(3), B<mtrace>(3), B<posix_memalign>(3)"
997
998 #. type: Plain text
999 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1000 #: opensuse-tumbleweed
1001 msgid ""
1002 "For details of the GNU C library implementation, see E<.UR https:\\://"
1003 "sourceware.org/glibc/wiki/MallocInternals> E<.UE .>"
1004 msgstr ""
1005 "Für Details über die GNU-C-Bibliotheksimplementierung, siehe E<.UR https:"
1006 "\\://sourceware.org/glibc/wiki/MallocInternals> E<.UE .>"
1007
1008 #. type: TH
1009 #: debian-trixie
1010 #, no-wrap
1011 msgid "2024-05-02"
1012 msgstr "2. Mai 2024"
1013
1014 #. type: TH
1015 #: debian-trixie
1016 #, no-wrap
1017 msgid "Linux man-pages 6.9.1"
1018 msgstr "Linux man-pages 6.9.1"
1019
1020 #. type: Plain text
1021 #: debian-trixie
1022 msgid "Standard C library (I<libc>, I<-lc>)"
1023 msgstr "Standard-C-Bibliothek (I<libc>, I<-lc>)"
1024
1025 #. type: Plain text
1026 #: debian-trixie
1027 #, no-wrap
1028 msgid ""
1029 "B<void *malloc(size_t >I<size>B<);>\n"
1030 "B<void free(void *_Nullable >I<ptr>B<);>\n"
1031 "B<void *calloc(size_t >I<nmemb>B<, size_t >I<size>B<);>\n"
1032 "B<void *realloc(void *_Nullable >I<ptr>B<, size_t >I<size>B<);>\n"
1033 "B<void *reallocarray(void *_Nullable >I<ptr>B<, size_t >I<nmemb>B<, size_t >I<size>B<);>\n"
1034 msgstr ""
1035 "B<void *malloc(size_t >I<Größe>B<);>\n"
1036 "B<void free(void *_Nullable >I<zeiger>B<);>\n"
1037 "B<void *calloc(size_t >I<nmemb>B<, size_t >I<Größe>B<);>\n"
1038 "B<void *realloc(void *_Nullable >I<zeiger>B<, size_t >I<Größe>B<);>\n"
1039 "B<void *reallocarray(void *_Nullable >I<zeiger>B<, size_t >I<nmemb>B<, size_t >I<Größe>B<);>\n"
1040
1041 #. type: Plain text
1042 #: debian-trixie fedora-44 fedora-rawhide
1043 msgid ""
1044 "The B<free>() function frees the memory space pointed to by I<ptr>, which "
1045 "must have been returned by a previous call to B<malloc>() or related "
1046 "functions. Otherwise, or if I<ptr> has already been freed, undefined "
1047 "behavior occurs. If I<ptr> is NULL, no operation is performed."
1048 msgstr ""
1049 "B<free>() gibt den Speicher frei, auf den I<zeiger> zeigt, welcher von einem "
1050 "früheren Aufruf von B<malloc>() oder verwandten Funktionen belegt worden "
1051 "sein muss. Andernfalls oder wenn I<zeiger> bereits freigegeben wurde, ist "
1052 "das Verhalten nicht definiert. Wenn I<zeiger> NULL ist, wird keine Operation "
1053 "ausgeführt."
1054
1055 #. type: Plain text
1056 #: debian-trixie
1057 msgid ""
1058 "The B<calloc>() function allocates memory for an array of I<nmemb> elements "
1059 "of I<size> bytes each and returns a pointer to the allocated memory. The "
1060 "memory is set to zero. If I<nmemb> or I<size> is 0, then B<calloc>() "
1061 "returns a unique pointer value that can later be successfully passed to "
1062 "B<free>()."
1063 msgstr ""
1064 "Die Funktion B<calloc>() belegt Speicher für ein Feld von I<nmemb> Elementen "
1065 "der jeweiligen Größe I<Größe> und liefert einen Zeiger auf den belegten "
1066 "Speicher zurück. Der Speicher wird auf 0 gesetzt. Falls I<nmemb> oder "
1067 "I<Größe> 0 ist, wird B<calloc>() einen eindeutigen Zeigerwert zurückgeben, "
1068 "der später erfolgreich an B<free>() übergeben werden kann."
1069
1070 #. type: Plain text
1071 #: debian-trixie
1072 msgid ""
1073 "If the multiplication of I<nmemb> and I<size> would result in integer "
1074 "overflow, then B<calloc>() returns an error. By contrast, an integer "
1075 "overflow would not be detected in the following call to B<malloc>(), with "
1076 "the result that an incorrectly sized block of memory would be allocated:"
1077 msgstr ""
1078 "Falls die Multiplikation von I<nmemb> und I<Größe> zu einem Ganzzahlüberlauf "
1079 "führen würde, dann liefert B<calloc>() einen Fehler zurück. Im Gegensatz "
1080 "dazu würde ein Ganzzahlüberlauf in dem nachfolgenden Aufruf von B<malloc>() "
1081 "nicht erkannt werden, was zu einer Zuweisung eines Speicherblocks mit "
1082 "falscher Größe führen würde:"
1083
1084 #. type: Plain text
1085 #: debian-trixie
1086 #, no-wrap
1087 msgid "malloc(nmemb * size);\n"
1088 msgstr "malloc(nmemb * Größe);\n"
1089
1090 #. type: Plain text
1091 #: debian-trixie fedora-44 fedora-rawhide
1092 msgid ""
1093 "The B<realloc>() function changes the size of the memory block pointed to "
1094 "by I<ptr> to I<size> bytes. The contents of the memory will be unchanged in "
1095 "the range from the start of the region up to the minimum of the old and new "
1096 "sizes. If the new size is larger than the old size, the added memory will "
1097 "I<not> be initialized."
1098 msgstr ""
1099 "B<realloc>() ändert die Größe des Speicherblocks, auf den I<zeiger> zeigt, "
1100 "auf I<Größe> Byte. Der Inhalt des Speichers bleibt im Bereich vom Anfang des "
1101 "Speicherbereichs bis zum Minimum von alter und neuer Größe unverändert. "
1102 "Falls die neue Größe die alte überschreitet, wird der zusätzliche Speicher "
1103 "I<nicht> initialisiert."
1104
1105 #. type: Plain text
1106 #: debian-trixie fedora-44 fedora-rawhide
1107 msgid ""
1108 "If I<ptr> is NULL, then the call is equivalent to I<malloc(size)>, for all "
1109 "values of I<size>."
1110 msgstr ""
1111 "Falls I<zeiger> gleich NULL ist, ist der Aufruf äquivalent zu "
1112 "I<malloc(Größe)>."
1113
1114 #. type: Plain text
1115 #: debian-trixie fedora-44 fedora-rawhide
1116 msgid ""
1117 "If I<size> is equal to zero, and I<ptr> is not NULL, then the call is "
1118 "equivalent to I<free(ptr)> (but see \"Nonportable behavior\" for portability "
1119 "issues)."
1120 msgstr ""
1121 "falls die Größe gleich Null und I<zeiger> von NULL verschieden ist, ist der "
1122 "Aufruf äquivalent zu I<free(zeiger)> (siehe aber »Nichtportables Verhalten« "
1123 "für Portabilitäts-Probleme.)"
1124
1125 #. type: Plain text
1126 #: debian-trixie fedora-44 fedora-rawhide
1127 msgid ""
1128 "Unless I<ptr> is NULL, it must have been returned by an earlier call to "
1129 "B<malloc> or related functions. If the area pointed to was moved, a "
1130 "I<free(ptr)> is done."
1131 msgstr ""
1132 "Wenn I<zeiger> nicht NULL ist, muss er von einem früheren Aufruf von "
1133 "B<malloc>() oder verwandten Funktionen zurückgegeben worden sein. Falls der "
1134 "Bereich, auf den verwiesen wurde, verschoben wurde, wird I<free(zeiger)> "
1135 "aufgerufen."
1136
1137 #. type: Plain text
1138 #: debian-trixie
1139 msgid ""
1140 "The B<reallocarray>() function changes the size of (and possibly moves) "
1141 "the memory block pointed to by I<ptr> to be large enough for an array of "
1142 "I<nmemb> elements, each of which is I<size> bytes. It is equivalent to the "
1143 "call"
1144 msgstr ""
1145 "Die Funktion B<reallocarray>() ändert die Größe des Speicherblocks, auf den "
1146 "I<zeiger> zeigt, (und verschiebt ihn möglicherweise,) damit er groß genug "
1147 "für ein Feld von I<nmemb> Elementen mit jeweils I<Größe> Byte ist. Sie ist "
1148 "äquivalent zu dem Aufruf:"
1149
1150 #. type: Plain text
1151 #: debian-trixie
1152 #, no-wrap
1153 msgid "realloc(ptr, nmemb * size);\n"
1154 msgstr "realloc(zeiger, nmemb * Größe);\n"
1155
1156 #. type: Plain text
1157 #: debian-trixie fedora-44 fedora-rawhide
1158 msgid ""
1159 "The B<realloc>() and B<reallocarray>() functions return NULL if I<ptr> is "
1160 "not NULL and the requested size is zero; this is not considered an error. "
1161 "(See \"Nonportable behavior\" for portability issues.) Otherwise, the "
1162 "returned pointer may be the same as I<ptr> if the allocation was not moved "
1163 "(e.g., there was room to expand the allocation in-place), or different from "
1164 "I<ptr> if the allocation was moved to a new address. If these functions "
1165 "fail, the original block is left untouched; it is not freed or moved."
1166 msgstr ""
1167 "Die Funktionen B<realloc>() und B<reallocarray>() liefern NULL zurück, falls "
1168 "I<zeiger> nicht NULL ist und die angeforderte Größe Null ist; dies wird "
1169 "nicht als Fehler betrachtet. (Siehe »Nichtportables Verhalten« für "
1170 "Portabilitäts-Probleme.) Andernfalls kann der zurückgelieferte Zeiger zu "
1171 "I<zeiger> identisch sein, falls die Belegung nicht verschoben wurde (z.B. "
1172 "weil genug Platz vorhanden war, um die Belegung am Ort selbst zu vergrößern) "
1173 "oder sich von I<zeiger> unterscheiden, falls die Belegung an eine neue "
1174 "Adresse verschoben wurde. Wenn diese Funktionen scheitern, bleibt der "
1175 "ursprüngliche Block unverändert - er wird nicht freigegeben oder verschoben."
1176
1177 #. type: Plain text
1178 #: debian-trixie fedora-44 fedora-rawhide
1179 msgid "C11, POSIX.1-2008."
1180 msgstr "C11, POSIX.1-2008."
1181
1182 #. type: Plain text
1183 #: debian-trixie fedora-44 fedora-rawhide
1184 msgid "None."
1185 msgstr "Keine."
1186
1187 #. type: Plain text
1188 #: debian-trixie
1189 #, no-wrap
1190 msgid ""
1191 "#include E<lt>err.hE<gt>\n"
1192 "#include E<lt>stddef.hE<gt>\n"
1193 "#include E<lt>stdio.hE<gt>\n"
1194 "#include E<lt>stdlib.hE<gt>\n"
1195 "#include E<lt>string.hE<gt>\n"
1196 "\\&\n"
1197 "#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n"
1198 "#define MALLOC(type) MALLOCARRAY(1, type)\n"
1199 "\\&\n"
1200 "static inline void *my_mallocarray(size_t nmemb, size_t size);\n"
1201 "\\&\n"
1202 "int\n"
1203 "main(void)\n"
1204 "{\n"
1205 " char *p;\n"
1206 "\\&\n"
1207 " p = MALLOCARRAY(32, char);\n"
1208 " if (p == NULL)\n"
1209 " err(EXIT_FAILURE, \"malloc\");\n"
1210 "\\&\n"
1211 " strlcpy(p, \"foo\", 32);\n"
1212 " puts(p);\n"
1213 "}\n"
1214 "\\&\n"
1215 "static inline void *\n"
1216 "my_mallocarray(size_t nmemb, size_t size)\n"
1217 "{\n"
1218 " return reallocarray(NULL, nmemb, size);\n"
1219 "}\n"
1220 msgstr ""
1221 "#include E<lt>err.hE<gt>\n"
1222 "#include E<lt>stddef.hE<gt>\n"
1223 "#include E<lt>stdio.hE<gt>\n"
1224 "#include E<lt>stdlib.hE<gt>\n"
1225 "#include E<lt>string.hE<gt>\n"
1226 "\\&\n"
1227 "#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n"
1228 "#define MALLOC(type) MALLOCARRAY(1, type)\n"
1229 "\\&\n"
1230 "static inline void *my_mallocarray(size_t nmemb, size_t size);\n"
1231 "\\&\n"
1232 "int\n"
1233 "main(void)\n"
1234 "{\n"
1235 " char *p;\n"
1236 "\\&\n"
1237 " p = MALLOCARRAY(32, char);\n"
1238 " if (p == NULL)\n"
1239 " err(EXIT_FAILURE, \"malloc\");\n"
1240 "\\&\n"
1241 " strlcpy(p, \"foo\", 32);\n"
1242 " puts(p);\n"
1243 "}\n"
1244 "\\&\n"
1245 "static inline void *\n"
1246 "my_mallocarray(size_t nmemb, size_t size)\n"
1247 "{\n"
1248 " return reallocarray(NULL, nmemb, size);\n"
1249 "}\n"
1250
1251 #. type: Plain text
1252 #: debian-trixie fedora-44 fedora-rawhide
1253 msgid ""
1254 "For details of the GNU C library implementation, see E<.UR https://"
1255 "sourceware.org/glibc/wiki/MallocInternals> E<.UE .>"
1256 msgstr ""
1257 "Für Details über die GNU-C-Bibliotheksimplementierung, siehe E<.UR https://"
1258 "sourceware.org/glibc/wiki/MallocInternals> E<.UE .>"
1259
1260 #. type: TH
1261 #: fedora-44 fedora-rawhide
1262 #, no-wrap
1263 msgid "2024-11-17"
1264 msgstr "17. November 2024"
1265
1266 #. type: TH
1267 #: fedora-44 fedora-rawhide
1268 #, no-wrap
1269 msgid "Linux man-pages 6.13"
1270 msgstr "Linux man-pages 6.13"
1271
1272 #. type: Plain text
1273 #: fedora-44 fedora-rawhide
1274 #, no-wrap
1275 msgid ""
1276 "B<void *malloc(size_t >I<size>B<);>\n"
1277 "B<void free(void *_Nullable >I<ptr>B<);>\n"
1278 "B<void *calloc(size_t >I<n>B<, size_t >I<size>B<);>\n"
1279 "B<void *realloc(void *_Nullable >I<ptr>B<, size_t >I<size>B<);>\n"
1280 "B<void *reallocarray(void *_Nullable >I<ptr>B<, size_t >I<n>B<, size_t >I<size>B<);>\n"
1281 msgstr ""
1282 "B<void *malloc(size_t >I<Größe>B<);>\n"
1283 "B<void free(void *_Nullable >I<zeiger>B<);>\n"
1284 "B<void *calloc(size_t >I<n>B<, size_t >I<Größe>B<);>\n"
1285 "B<void *realloc(void *_Nullable >I<zeiger>B<, size_t >I<Größe>B<);>\n"
1286 "B<void *reallocarray(void *_Nullable >I<zeiger>B<, size_t >I<n>B<, size_t >I<Größe>B<);>\n"
1287
1288 #. type: Plain text
1289 #: fedora-44 fedora-rawhide
1290 msgid ""
1291 "The B<reallocarray>() function changes the size of (and possibly moves) "
1292 "the memory block pointed to by I<ptr> to be large enough for an array of "
1293 "I<n> elements, each of which is I<size> bytes. It is equivalent to the call"
1294 msgstr ""
1295 "Die Funktion B<reallocarray>() ändert die Größe des Speicherblocks, auf den "
1296 "I<zeiger> zeigt, (und verschiebt ihn möglicherweise,) damit er groß genug "
1297 "für ein Feld von I<n> Elementen mit jeweils I<Größe> Byte ist. Sie ist "
1298 "äquivalent zu dem Aufruf:"
1299
1300 #. type: Plain text
1301 #: fedora-44 fedora-rawhide
1302 #, no-wrap
1303 msgid "realloc(ptr, n * size);\n"
1304 msgstr "realloc(zeiger, n * Größe);\n"
1305
1306 #. type: TH
1307 #: mageia-cauldron
1308 #, no-wrap
1309 msgid "Linux man-pages 6.17"
1310 msgstr "Linux man-pages 6.17"
1311
1312 #. type: TH
1313 #: opensuse-leap-16-1 opensuse-tumbleweed
1314 #, no-wrap
1315 msgid "Linux man-pages (unreleased)"
1316 msgstr "Linux man-pages (unveröffentlicht)"