| 1 |
# French translation of manpages |
| 2 |
# This file is distributed under the same license as the manpages-l10n package. |
| 3 |
# Copyright © of this file: |
| 4 |
# Christophe Blaess <https://www.blaess.fr/christophe/>, 1996-2003. |
| 5 |
# Stéphan Rafin <[email protected]>, 2002. |
| 6 |
# Thierry Vignaud <[email protected]>, 1999, 2002. |
| 7 |
# François Micaux, 2002. |
| 8 |
# Alain Portal <[email protected]>, 2003-2008. |
| 9 |
# Jean-Philippe Guérard <[email protected]>, 2005-2006. |
| 10 |
# Jean-Luc Coulon (f5ibh) <[email protected]>, 2006-2007. |
| 11 |
# Julien Cristau <[email protected]>, 2006-2007. |
| 12 |
# Thomas Huriaux <[email protected]>, 2006-2008. |
| 13 |
# Nicolas François <[email protected]>, 2006-2008. |
| 14 |
# Florentin Duneau <[email protected]>, 2006-2010. |
| 15 |
# Simon Paillard <[email protected]>, 2006, 2013. |
| 16 |
# Denis Barbier <[email protected]>, 2006, 2010. |
| 17 |
# David Prévot <[email protected]>, 2010, 2012-2014. |
| 18 |
# Grégoire Scano <[email protected]>, 2020-2021. |
| 19 |
# Lucien Gentis <[email protected]>, 2023-2025. |
| 20 |
msgid "" |
| 21 |
msgstr "" |
| 22 |
"Project-Id-Version: manpages-l10n 4.21.0\n" |
| 23 |
"POT-Creation-Date: 2026-06-05 06:30+0200\n" |
| 24 |
"PO-Revision-Date: 2026-01-06 16:06+0100\n" |
| 25 |
"Last-Translator: Lucien Gentis <[email protected]>\n" |
| 26 |
"Language-Team: French <[email protected]>\n" |
| 27 |
"Language: fr\n" |
| 28 |
"MIME-Version: 1.0\n" |
| 29 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 30 |
"Content-Transfer-Encoding: 8bit\n" |
| 31 |
"Plural-Forms: nplurals=2; plural=n > 1;\n" |
| 32 |
"X-Generator: vim-gtk3\n" |
| 33 |
|
| 34 |
#. type: TH |
| 35 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 36 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 37 |
#, no-wrap |
| 38 |
msgid "malloc" |
| 39 |
msgstr "malloc" |
| 40 |
|
| 41 |
#. type: TH |
| 42 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 43 |
#: opensuse-tumbleweed |
| 44 |
#, no-wrap |
| 45 |
msgid "2026-02-08" |
| 46 |
msgstr "8 février 2026" |
| 47 |
|
| 48 |
#. type: TH |
| 49 |
#: archlinux debian-unstable |
| 50 |
#, no-wrap |
| 51 |
msgid "Linux man-pages 6.18" |
| 52 |
msgstr "Pages du manuel de Linux 6.18" |
| 53 |
|
| 54 |
#. type: SH |
| 55 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 56 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 57 |
#, no-wrap |
| 58 |
msgid "NAME" |
| 59 |
msgstr "NOM" |
| 60 |
|
| 61 |
#. type: Plain text |
| 62 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 63 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 64 |
msgid "" |
| 65 |
"malloc, free, calloc, realloc, reallocarray - allocate and free dynamic " |
| 66 |
"memory" |
| 67 |
msgstr "" |
| 68 |
"malloc, free, calloc, realloc, reallocarray — Allocation et libération de " |
| 69 |
"mémoire dynamique" |
| 70 |
|
| 71 |
#. type: SH |
| 72 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 73 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 74 |
#, no-wrap |
| 75 |
msgid "LIBRARY" |
| 76 |
msgstr "BIBLIOTHÈQUE" |
| 77 |
|
| 78 |
#. type: Plain text |
| 79 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 80 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 81 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 82 |
msgstr "Bibliothèque C standard (I<libc>,\\ I<-lc>)" |
| 83 |
|
| 84 |
#. type: SH |
| 85 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 86 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 87 |
#, no-wrap |
| 88 |
msgid "SYNOPSIS" |
| 89 |
msgstr "SYNOPSIS" |
| 90 |
|
| 91 |
#. type: Plain text |
| 92 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 93 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 94 |
#, no-wrap |
| 95 |
msgid "B<#include E<lt>stdlib.hE<gt>>\n" |
| 96 |
msgstr "B<#include E<lt>stdlib.hE<gt>>\n" |
| 97 |
|
| 98 |
#. type: Plain text |
| 99 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 100 |
#: opensuse-tumbleweed |
| 101 |
#, no-wrap |
| 102 |
msgid "" |
| 103 |
"B<void *malloc(size_t >I<size>B<);>\n" |
| 104 |
"B<void free(void *_Nullable >I<p>B<);>\n" |
| 105 |
"B<void *calloc(size_t >I<n>B<, size_t >I<size>B<);>\n" |
| 106 |
"B<void *realloc(void *_Nullable >I<p>B<, size_t >I<size>B<);>\n" |
| 107 |
"B<void *reallocarray(void *_Nullable >I<p>B<, size_t >I<n>B<, size_t >I<size>B<);>\n" |
| 108 |
msgstr "" |
| 109 |
"B<void *malloc(size_t >I<taille>B<);>\n" |
| 110 |
"B<void free(void *_Nullable >I<p>B<);>\n" |
| 111 |
"B<void *calloc(size_t >I<n>B<, size_t >I<taille>B<);>\n" |
| 112 |
"B<void *realloc(void *_Nullable >I<p>B<, size_t >I<taille>B<);>\n" |
| 113 |
"B<void *reallocarray(void *_Nullable >I<p>B<, size_t >I<n>B<, size_t >I<taille>B<);>\n" |
| 114 |
|
| 115 |
#. type: Plain text |
| 116 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 117 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 118 |
msgid "" |
| 119 |
"Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):" |
| 120 |
msgstr "" |
| 121 |
"Exigences de macros de test de fonctionnalités pour la glibc (consulter " |
| 122 |
"B<feature_test_macros>(7)) :" |
| 123 |
|
| 124 |
#. type: Plain text |
| 125 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 126 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 127 |
msgid "B<reallocarray>():" |
| 128 |
msgstr "B<reallocarray>() :" |
| 129 |
|
| 130 |
#. type: Plain text |
| 131 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 132 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 133 |
#, no-wrap |
| 134 |
msgid "" |
| 135 |
" Since glibc 2.29:\n" |
| 136 |
" _DEFAULT_SOURCE\n" |
| 137 |
" glibc 2.28 and earlier:\n" |
| 138 |
" _GNU_SOURCE\n" |
| 139 |
msgstr "" |
| 140 |
" Depuis la glibc 2.29 :\n" |
| 141 |
" _DEFAULT_SOURCE\n" |
| 142 |
" glibc 2.28 et précédentes :\n" |
| 143 |
" _GNU_SOURCE\n" |
| 144 |
|
| 145 |
#. type: SH |
| 146 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 147 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 148 |
#, no-wrap |
| 149 |
msgid "DESCRIPTION" |
| 150 |
msgstr "DESCRIPTION" |
| 151 |
|
| 152 |
#. type: SS |
| 153 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 154 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 155 |
#, no-wrap |
| 156 |
msgid "malloc()" |
| 157 |
msgstr "malloc()" |
| 158 |
|
| 159 |
#. type: Plain text |
| 160 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 161 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 162 |
msgid "" |
| 163 |
"The B<malloc>() function allocates I<size> bytes and returns a pointer to " |
| 164 |
"the allocated memory. I<The memory is not initialized>. If I<size> is 0, " |
| 165 |
"then B<malloc>() returns a unique pointer value that can later be " |
| 166 |
"successfully passed to B<free>(). (See \"Nonportable behavior\" for " |
| 167 |
"portability issues.)" |
| 168 |
msgstr "" |
| 169 |
"La fonction B<malloc>() alloue I<taille> octets et renvoie un pointeur sur " |
| 170 |
"la mémoire allouée. I<Le contenu de la zone de mémoire n'est pas " |
| 171 |
"initialisé>. Si I<taille> est nulle, B<malloc> renvoie une valeur de " |
| 172 |
"pointeur unique qui pourra être passée ultérieurement à B<free>() avec " |
| 173 |
"succès (consulter « Comportement non portable » pour les problèmes de " |
| 174 |
"portabilité)." |
| 175 |
|
| 176 |
#. type: SS |
| 177 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 178 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 179 |
#, no-wrap |
| 180 |
msgid "free()" |
| 181 |
msgstr "free()" |
| 182 |
|
| 183 |
#. type: Plain text |
| 184 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 185 |
#: opensuse-tumbleweed |
| 186 |
msgid "" |
| 187 |
"The B<free>() function frees the memory space pointed to by I<p>, which " |
| 188 |
"must have been returned by a previous call to B<malloc>() or related " |
| 189 |
"functions. Otherwise, or if I<p> has already been freed, undefined behavior " |
| 190 |
"occurs. If I<p> is NULL, no operation is performed." |
| 191 |
msgstr "" |
| 192 |
"La fonction B<free>() libère l'espace mémoire pointé par I<p> qui doit avoir " |
| 193 |
"été obtenu lors d'un appel antérieur à B<malloc>() ou une fonction de la " |
| 194 |
"même famille. Autrement, ou si I<p> a déjà été libéré, le comportement est " |
| 195 |
"indéterminé. Si I<p> est NULL, aucune opération n'est effectuée." |
| 196 |
|
| 197 |
#. type: SS |
| 198 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 199 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 200 |
#, no-wrap |
| 201 |
msgid "calloc()" |
| 202 |
msgstr "calloc()" |
| 203 |
|
| 204 |
#. type: Plain text |
| 205 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 206 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 207 |
msgid "" |
| 208 |
"The B<calloc>() function allocates memory for an array of I<n> elements of " |
| 209 |
"I<size> bytes each and returns a pointer to the allocated memory. The " |
| 210 |
"memory is set to zero. If I<n> or I<size> is 0, then B<calloc>() returns a " |
| 211 |
"unique pointer value that can later be successfully passed to B<free>()." |
| 212 |
msgstr "" |
| 213 |
"La fonction B<calloc>() alloue de la mémoire pour un tableau de I<n> " |
| 214 |
"éléments de I<taille> octets chacun et renvoie un pointeur sur la mémoire " |
| 215 |
"allouée. La zone mémoire est initialisée avec des B<0>. Si I<n> ou I<taille> " |
| 216 |
"vaut B<0>, B<calloc>() renvoie une valeur de pointeur unique qui pourra être " |
| 217 |
"passée ultérieurement à B<free>() avec succès." |
| 218 |
|
| 219 |
#. type: Plain text |
| 220 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 221 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 222 |
msgid "" |
| 223 |
"If the multiplication of I<n> and I<size> would result in integer overflow, " |
| 224 |
"then B<calloc>() returns an error. By contrast, an integer overflow would " |
| 225 |
"not be detected in the following call to B<malloc>(), with the result that " |
| 226 |
"an incorrectly sized block of memory would be allocated:" |
| 227 |
msgstr "" |
| 228 |
"Si la multiplication de I<n> par I<taille> provoque un dépassement d'entier, " |
| 229 |
"B<calloc>() renvoie une erreur. Par contre, aucun dépassement d'entier ne " |
| 230 |
"serait détecté lors de l'appel suivant à B<malloc>(), avec pour conséquence " |
| 231 |
"l'allocation d'un bloc de mémoire incorrectement dimensionné :" |
| 232 |
|
| 233 |
#. type: Plain text |
| 234 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 235 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 236 |
#, no-wrap |
| 237 |
msgid "malloc(n * size);\n" |
| 238 |
msgstr "malloc(n * taille);\n" |
| 239 |
|
| 240 |
#. type: SS |
| 241 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 242 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 243 |
#, no-wrap |
| 244 |
msgid "realloc()" |
| 245 |
msgstr "realloc()" |
| 246 |
|
| 247 |
#. type: Plain text |
| 248 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 249 |
#: opensuse-tumbleweed |
| 250 |
msgid "" |
| 251 |
"The B<realloc>() function changes the size of the memory block pointed to " |
| 252 |
"by I<p> to I<size> bytes. The contents of the memory will be unchanged in " |
| 253 |
"the range from the start of the region up to the minimum of the old and new " |
| 254 |
"sizes. If the new size is larger than the old size, the added memory will " |
| 255 |
"I<not> be initialized." |
| 256 |
msgstr "" |
| 257 |
"La fonction B<realloc>() modifie la taille du bloc de mémoire pointé par " |
| 258 |
"I<p> à I<taille> octets. Le contenu de la mémoire entre la zone de départ et " |
| 259 |
"le minimum des ancienne et nouvelle tailles n'est pas modifié. Si la " |
| 260 |
"nouvelle taille est plus grande que l'ancienne taille, le contenu de la zone " |
| 261 |
"de mémoire nouvellement allouée n'est I<pas> initialisé." |
| 262 |
|
| 263 |
#. type: Plain text |
| 264 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 265 |
#: opensuse-tumbleweed |
| 266 |
msgid "" |
| 267 |
"If I<p> is NULL, then the call is equivalent to I<malloc(size)>, for all " |
| 268 |
"values of I<size>." |
| 269 |
msgstr "" |
| 270 |
"Si I<p> est égal à NULL, l'appel est équivalent à I<malloc(taille)> pour " |
| 271 |
"toutes les valeurs de I<taille>." |
| 272 |
|
| 273 |
#. type: Plain text |
| 274 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 275 |
#: opensuse-tumbleweed |
| 276 |
msgid "" |
| 277 |
"If I<size> is equal to zero, and I<p> is not NULL, then the call is " |
| 278 |
"equivalent to I<free(p)> (but see \"Nonportable behavior\" for portability " |
| 279 |
"issues)." |
| 280 |
msgstr "" |
| 281 |
"Si I<taille> est égale à zéro et si I<p> est différent de NULL, l'appel est " |
| 282 |
"équivalent à I<free(p)> (consulter cependant « Comportement non portable » " |
| 283 |
"pour les problèmes de portabilité)." |
| 284 |
|
| 285 |
#. type: Plain text |
| 286 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 287 |
#: opensuse-tumbleweed |
| 288 |
msgid "" |
| 289 |
"Unless I<p> is NULL, it must have been returned by an earlier call to " |
| 290 |
"B<malloc> or related functions. If the area pointed to was moved, a " |
| 291 |
"I<free(p)> is done." |
| 292 |
msgstr "" |
| 293 |
"Excepté le cas où I<p> est égal à NULL, il doit avoir été renvoyé par un " |
| 294 |
"appel précédent à B<malloc> ou à une fonction de la même famille. Si la zone " |
| 295 |
"pointée a été déplacée, l'appel I<free(p)> est effectué." |
| 296 |
|
| 297 |
#. type: SS |
| 298 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 299 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 300 |
#, no-wrap |
| 301 |
msgid "reallocarray()" |
| 302 |
msgstr "reallocarray()" |
| 303 |
|
| 304 |
#. type: Plain text |
| 305 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 306 |
#: opensuse-tumbleweed |
| 307 |
msgid "" |
| 308 |
"The B<reallocarray>() function changes the size of (and possibly moves) " |
| 309 |
"the memory block pointed to by I<p> to be large enough for an array of I<n> " |
| 310 |
"elements, each of which is I<size> bytes. It is equivalent to the call" |
| 311 |
msgstr "" |
| 312 |
"La fonction B<reallocarray>() déplace éventuellement le bloc mémoire pointé " |
| 313 |
"par I<p> et change sa taille pour qu'il soit suffisamment grand pour " |
| 314 |
"contenir un tableau de I<n> éléments faisant chacun I<taille> octets. Elle " |
| 315 |
"équivaut à l'appel" |
| 316 |
|
| 317 |
#. type: Plain text |
| 318 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 319 |
#: opensuse-tumbleweed |
| 320 |
#, no-wrap |
| 321 |
msgid "realloc(p, n * size);\n" |
| 322 |
msgstr "realloc(p, n * taille);\n" |
| 323 |
|
| 324 |
#. type: Plain text |
| 325 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 326 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 327 |
msgid "" |
| 328 |
"However, unlike that B<realloc>() call, B<reallocarray>() fails safely in " |
| 329 |
"the case where the multiplication would overflow. If such an overflow " |
| 330 |
"occurs, B<reallocarray>() returns an error." |
| 331 |
msgstr "" |
| 332 |
"Cependant, contrairement à cet appel de B<realloc>(), B<reallocarray>() " |
| 333 |
"échoue pour éviter tout problème dans le cas où la multiplication " |
| 334 |
"entraînerait un dépassement. Si un tel dépassement se produit, " |
| 335 |
"B<reallocarray>() renvoie une erreur." |
| 336 |
|
| 337 |
#. type: SH |
| 338 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 339 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 340 |
#, no-wrap |
| 341 |
msgid "RETURN VALUE" |
| 342 |
msgstr "VALEUR RENVOYÉE" |
| 343 |
|
| 344 |
#. type: Plain text |
| 345 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 346 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 347 |
msgid "" |
| 348 |
"The B<malloc>(), B<calloc>(), B<realloc>(), and B<reallocarray>() functions " |
| 349 |
"return a pointer to the allocated memory, which is suitably aligned for any " |
| 350 |
"type that fits into the requested size or less. On error, these functions " |
| 351 |
"return NULL and set I<errno>. Attempting to allocate more than " |
| 352 |
"B<PTRDIFF_MAX> bytes is considered an error, as an object that large could " |
| 353 |
"cause later pointer subtraction to overflow." |
| 354 |
msgstr "" |
| 355 |
"Les fonctions B<malloc>(), B<calloc>(), B<realloc>() et B<reallocarray>() " |
| 356 |
"renvoient un pointeur vers la mémoire allouée qui est correctement alignée " |
| 357 |
"pour n'importe quel type dont la taille correspondra à la taille demandée ou " |
| 358 |
"sera inférieure à cette dernière. Si elles échouent, elles renvoient NULL et " |
| 359 |
"définissent I<errno> pour indiquer l'erreur. Essayer d'allouer plus que " |
| 360 |
"B<PTRDIFF_MAX> octets est considéré comme une erreur, car un objet de cette " |
| 361 |
"taille pourrait provoquer un dépassement lors d'une soustraction de pointeur " |
| 362 |
"ultérieure." |
| 363 |
|
| 364 |
#. type: Plain text |
| 365 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 366 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 367 |
msgid "The B<free>() function returns no value, and preserves I<errno>." |
| 368 |
msgstr "La fonction B<free>() ne renvoie aucune valeur et préserve I<errno>." |
| 369 |
|
| 370 |
#. type: Plain text |
| 371 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 372 |
#: opensuse-tumbleweed |
| 373 |
msgid "" |
| 374 |
"The B<realloc>() and B<reallocarray>() functions return NULL if I<p> is " |
| 375 |
"not NULL and the requested size is zero; this is not considered an error. " |
| 376 |
"(See \"Nonportable behavior\" for portability issues.) Otherwise, the " |
| 377 |
"returned pointer may be the same as I<p> if the allocation was not moved " |
| 378 |
"(e.g., there was room to expand the allocation in-place), or different from " |
| 379 |
"I<p> if the allocation was moved to a new address. If these functions fail, " |
| 380 |
"the original block is left untouched; it is not freed or moved." |
| 381 |
msgstr "" |
| 382 |
"Les fonction B<realloc>() et B<reallocarray>() renvoient NULL si I<p> est " |
| 383 |
"différent de NULL et si la taille demandée est égale à zéro, ce qui n'est " |
| 384 |
"pas considéré comme une erreur (consulter « Comportement non portable » pour " |
| 385 |
"les problèmes de portabilité). Dans le cas contraire, le pointeur renvoyé " |
| 386 |
"peut être identique à I<p> si la zone mémoire n'a pas été déplacée (par " |
| 387 |
"exemple s'il y a assez de place pour l'étendre à son emplacement), ou peut " |
| 388 |
"être différent de I<p> si la zone mémoire a été déplacée à une nouvelle " |
| 389 |
"adresse. Si ces fonctions échouent, le bloc mémoire originel reste intact ; " |
| 390 |
"il n'est ni libéré ni déplacé." |
| 391 |
|
| 392 |
#. type: SH |
| 393 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 394 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 395 |
#, no-wrap |
| 396 |
msgid "ERRORS" |
| 397 |
msgstr "ERREURS" |
| 398 |
|
| 399 |
#. type: Plain text |
| 400 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 401 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 402 |
msgid "" |
| 403 |
"B<calloc>(), B<malloc>(), B<realloc>(), and B<reallocarray>() can fail with " |
| 404 |
"the following error:" |
| 405 |
msgstr "" |
| 406 |
"B<calloc>(), B<malloc>(), B<realloc>() et B<reallocarray>() peuvent échouer " |
| 407 |
"avec l'erreur suivante :" |
| 408 |
|
| 409 |
#. type: TP |
| 410 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 411 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 412 |
#, no-wrap |
| 413 |
msgid "B<ENOMEM>" |
| 414 |
msgstr "B<ENOMEM>" |
| 415 |
|
| 416 |
#. type: Plain text |
| 417 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 418 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 419 |
msgid "" |
| 420 |
"Out of memory. Possibly, the application hit the B<RLIMIT_AS> or " |
| 421 |
"B<RLIMIT_DATA> limit described in B<getrlimit>(2). Another reason could be " |
| 422 |
"that the number of mappings created by the caller process exceeded the limit " |
| 423 |
"specified by I</proc/sys/vm/max_map_count>." |
| 424 |
msgstr "" |
| 425 |
"Plus de mémoire. Il est possible que l'application ait atteint les limites " |
| 426 |
"B<RLIMIT_AS> ou B<RLIMIT_DATA> décrites dans B<getrlimit>(2). Une autre " |
| 427 |
"raison pourrait être que le nombre de mappages créés par le processus " |
| 428 |
"appelant dépasse la limite spécifiée par I</proc/sys/vm/max_map_count>." |
| 429 |
|
| 430 |
#. type: SH |
| 431 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 432 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 433 |
#, no-wrap |
| 434 |
msgid "ATTRIBUTES" |
| 435 |
msgstr "ATTRIBUTS" |
| 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 |
"For an explanation of the terms used in this section, see B<attributes>(7)." |
| 442 |
msgstr "" |
| 443 |
"Pour une explication des termes utilisés dans cette section, consulter " |
| 444 |
"B<attributes>(7)." |
| 445 |
|
| 446 |
#. type: tbl table |
| 447 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 448 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 449 |
#, no-wrap |
| 450 |
msgid "Interface" |
| 451 |
msgstr "Interface" |
| 452 |
|
| 453 |
#. type: tbl table |
| 454 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 455 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 456 |
#, no-wrap |
| 457 |
msgid "Attribute" |
| 458 |
msgstr "Attribut" |
| 459 |
|
| 460 |
#. type: tbl table |
| 461 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 462 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 463 |
#, no-wrap |
| 464 |
msgid "Value" |
| 465 |
msgstr "Valeur" |
| 466 |
|
| 467 |
#. type: tbl table |
| 468 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 469 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 470 |
#, no-wrap |
| 471 |
msgid ".na\n" |
| 472 |
msgstr ".na\n" |
| 473 |
|
| 474 |
#. type: tbl table |
| 475 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 476 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 477 |
#, no-wrap |
| 478 |
msgid ".nh\n" |
| 479 |
msgstr ".nh\n" |
| 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 "" |
| 486 |
"B<malloc>(),\n" |
| 487 |
"B<free>(),\n" |
| 488 |
"B<calloc>(),\n" |
| 489 |
"B<realloc>()" |
| 490 |
msgstr "" |
| 491 |
"B<malloc>(),\n" |
| 492 |
"B<free>(),\n" |
| 493 |
"B<calloc>(),\n" |
| 494 |
"B<realloc>()" |
| 495 |
|
| 496 |
#. type: tbl table |
| 497 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 498 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 499 |
#, no-wrap |
| 500 |
msgid "Thread safety" |
| 501 |
msgstr "Sécurité des threads" |
| 502 |
|
| 503 |
#. type: tbl table |
| 504 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 505 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 506 |
#, no-wrap |
| 507 |
msgid "MT-Safe" |
| 508 |
msgstr "MT-Safe" |
| 509 |
|
| 510 |
#. type: SH |
| 511 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 512 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 513 |
#, no-wrap |
| 514 |
msgid "STANDARDS" |
| 515 |
msgstr "NORMES" |
| 516 |
|
| 517 |
#. type: TP |
| 518 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 519 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 520 |
#, no-wrap |
| 521 |
msgid "B<malloc>()" |
| 522 |
msgstr "B<malloc>()" |
| 523 |
|
| 524 |
#. type: TQ |
| 525 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 526 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 527 |
#, no-wrap |
| 528 |
msgid "B<free>()" |
| 529 |
msgstr "B<free>()" |
| 530 |
|
| 531 |
#. type: TQ |
| 532 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 533 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 534 |
#, no-wrap |
| 535 |
msgid "B<calloc>()" |
| 536 |
msgstr "B<calloc>()" |
| 537 |
|
| 538 |
#. type: TQ |
| 539 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 540 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 541 |
#, no-wrap |
| 542 |
msgid "B<realloc>()" |
| 543 |
msgstr "B<realloc>()" |
| 544 |
|
| 545 |
#. type: Plain text |
| 546 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 547 |
#: opensuse-tumbleweed |
| 548 |
msgid "C23, POSIX.1-2024." |
| 549 |
msgstr "C23, POSIX.1-2024." |
| 550 |
|
| 551 |
#. type: TP |
| 552 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 553 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 554 |
#, no-wrap |
| 555 |
msgid "B<reallocarray>()" |
| 556 |
msgstr "B<reallocarray>()" |
| 557 |
|
| 558 |
#. type: Plain text |
| 559 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 560 |
#: opensuse-tumbleweed |
| 561 |
msgid "POSIX.1-2024." |
| 562 |
msgstr "POSIX.1-2024." |
| 563 |
|
| 564 |
#. type: SS |
| 565 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 566 |
#: opensuse-tumbleweed |
| 567 |
#, no-wrap |
| 568 |
msgid "realloc(p, 0)" |
| 569 |
msgstr "realloc(p, 0)" |
| 570 |
|
| 571 |
#. type: Plain text |
| 572 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 573 |
#: opensuse-tumbleweed |
| 574 |
msgid "" |
| 575 |
"The behavior of I<realloc(p,\\ 0)> in glibc doesn't conform to any of C99, " |
| 576 |
"C11, POSIX.1-2001, POSIX.1-2004, POSIX.1-2008, POSIX.1-2013, POSIX.1-2017, " |
| 577 |
"or POSIX.1-2024. The C17 specification was changed to make it conforming, " |
| 578 |
"but that specification made it impossible to write code that reliably " |
| 579 |
"determines if the input pointer is freed after I<realloc(p,\\ 0)>, and C23 " |
| 580 |
"changed it again to make this undefined behavior, acknowledging that the C17 " |
| 581 |
"specification was broad enough, so that undefined behavior wasn't worse than " |
| 582 |
"that." |
| 583 |
msgstr "" |
| 584 |
"Le comportement de I<realloc(p,\\ 0)> dans la glibc n’est conforme à aucune " |
| 585 |
"des normes C99, C11, POSIX.1-2001, POSIX.1-2004, POSIX.1-2008, POSIX.1-2013, " |
| 586 |
"POSIX.1-2017 ou POSIX.1-2024. La spécification C17 a été modifiée pour " |
| 587 |
"mettre cette fonction en conformité, mais cette spécification a rendu " |
| 588 |
"impossible l’écriture d’un code qui déterminerait de manière fiable si le " |
| 589 |
"pointeur d’entrée a été libéré après l’appel de I<realloc(p,\\ 0)>, et C23 a " |
| 590 |
"encore modifié les choses pour rendre ce comportement indéterminé, en " |
| 591 |
"assumant que la spécification C17 était suffisamment vaste, si bien qu’un " |
| 592 |
"comportement indéterminé n’était pas pire que ça." |
| 593 |
|
| 594 |
#. type: Plain text |
| 595 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 596 |
#: opensuse-tumbleweed |
| 597 |
msgid "B<reallocarray>() suffers the same issues in glibc." |
| 598 |
msgstr "B<reallocarray>() souffre du même problème dans la glibc." |
| 599 |
|
| 600 |
#. type: Plain text |
| 601 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 602 |
#: opensuse-tumbleweed |
| 603 |
msgid "musl libc and the BSDs conform to all versions of ISO C and POSIX.1." |
| 604 |
msgstr "" |
| 605 |
"La libc de B<musl> et celle de BSD sont conformes à toutes les versions de " |
| 606 |
"ISO C et POSIX.1." |
| 607 |
|
| 608 |
#. type: Plain text |
| 609 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 610 |
#: opensuse-tumbleweed |
| 611 |
msgid "" |
| 612 |
"gnulib provides the I<realloc-posix> module, which provides wrappers " |
| 613 |
"B<realloc>() and B<reallocarray>() that conform to all versions of ISO C " |
| 614 |
"and POSIX.1." |
| 615 |
msgstr "" |
| 616 |
"gnulib propose le module I<realloc-posix> fournissant les programmes " |
| 617 |
"enveloppe B<realloc>() et B<reallocarray>() qui sont conformes à toutes les " |
| 618 |
"versions de ISO C." |
| 619 |
|
| 620 |
#. type: Plain text |
| 621 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 622 |
#: opensuse-tumbleweed |
| 623 |
#, fuzzy |
| 624 |
#| msgid "" |
| 625 |
#| "There's a proposal to standardize the BSD behavior: E<.UR https://" |
| 626 |
#| "www.open-std.org/\\:jtc1/\\:sc22/\\:wg14/\\:www/\\:docs/\\:n3621.txt> " |
| 627 |
#| "E<.UE .>" |
| 628 |
msgid "" |
| 629 |
"There's a proposal to standardize the BSD behavior: E<.UR https:\\://" |
| 630 |
"www.open-std.org/\\:jtc1/\\:sc22/\\:wg14/\\:www/\\:docs/\\:n3621.txt> " |
| 631 |
"E<.UE .>" |
| 632 |
msgstr "" |
| 633 |
"Il existe un projet de standardiser le comportement de BSD : E<.UR https://" |
| 634 |
"www.open-std.org/\\:jtc1/\\:sc22/\\:wg14/\\:www/\\:docs/\\:n3621.txt> E<.UE>." |
| 635 |
|
| 636 |
#. type: SH |
| 637 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 638 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 639 |
#, no-wrap |
| 640 |
msgid "HISTORY" |
| 641 |
msgstr "HISTORIQUE" |
| 642 |
|
| 643 |
#. type: Plain text |
| 644 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 645 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 646 |
msgid "POSIX.1-2001, C89." |
| 647 |
msgstr "POSIX.1-2001, C89." |
| 648 |
|
| 649 |
#. type: Plain text |
| 650 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 651 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 652 |
msgid "glibc 2.26. OpenBSD 5.6, FreeBSD 11.0." |
| 653 |
msgstr "glibc 2.26. OpenBSD 5.6, FreeBSD 11.0." |
| 654 |
|
| 655 |
#. type: Plain text |
| 656 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 657 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 658 |
msgid "" |
| 659 |
"B<malloc>() and related functions rejected sizes greater than " |
| 660 |
"B<PTRDIFF_MAX> starting in glibc 2.30." |
| 661 |
msgstr "" |
| 662 |
"Depuis la glibc 2.30, B<malloc>() et les fonctions de la même famille " |
| 663 |
"refusent les tailles supérieures à B<PTRDIFF_MAX>." |
| 664 |
|
| 665 |
#. type: Plain text |
| 666 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 667 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 668 |
msgid "B<free>() preserved I<errno> starting in glibc 2.33." |
| 669 |
msgstr "Depuis la glibc 2.33, B<free>() préserve I<errno>." |
| 670 |
|
| 671 |
#. type: SS |
| 672 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 673 |
#: opensuse-tumbleweed |
| 674 |
#, no-wrap |
| 675 |
msgid "realloc(p,\\ 0)" |
| 676 |
msgstr "realloc(p,\\ 0)" |
| 677 |
|
| 678 |
#. type: Plain text |
| 679 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 680 |
#: opensuse-tumbleweed |
| 681 |
msgid "" |
| 682 |
"C89 was ambiguous in its specification of I<realloc(p,\\ 0)>. C99 partially " |
| 683 |
"fixed this." |
| 684 |
msgstr "" |
| 685 |
"C89 était ambigu quant à sa spécification de I<realloc(p,\\ 0)>. C99 y " |
| 686 |
"remédie partiellement." |
| 687 |
|
| 688 |
#. type: Plain text |
| 689 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 690 |
#: opensuse-tumbleweed |
| 691 |
msgid "" |
| 692 |
"The original implementation in glibc would have been conforming to C99. " |
| 693 |
"However, and ironically, trying to comply with C99 before the standard was " |
| 694 |
"released, glibc changed its behavior in glibc 2.1.1 into something that " |
| 695 |
"ended up not conforming to the final C99 specification (but this is debated, " |
| 696 |
"as the wording of the standard seems self-contradicting)." |
| 697 |
msgstr "" |
| 698 |
"L’implémentation originelle dans la glibc aurait été conforme à C99. " |
| 699 |
"Cependant, et ironiquement, en essayant de se conformer à C99 avant que la " |
| 700 |
"norme ne soit écrite, glibc modifia son comportement à partir de glibc 2.1.1 " |
| 701 |
"pour quelque chose qui s’avéra en fin de compte non conforme à la " |
| 702 |
"spécification finale de C99 (mais cela est débattu, car la formulation de la " |
| 703 |
"norme semble se contredire elle-même)." |
| 704 |
|
| 705 |
#. type: SH |
| 706 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 707 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 708 |
#, no-wrap |
| 709 |
msgid "NOTES" |
| 710 |
msgstr "NOTES" |
| 711 |
|
| 712 |
#. type: Plain text |
| 713 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 714 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 715 |
msgid "" |
| 716 |
"By default, Linux follows an optimistic memory allocation strategy. This " |
| 717 |
"means that when B<malloc>() returns non-NULL there is no guarantee that the " |
| 718 |
"memory really is available. In case it turns out that the system is out of " |
| 719 |
"memory, one or more processes will be killed by the OOM killer. For more " |
| 720 |
"information, see the description of I</proc/sys/vm/overcommit_memory> and I</" |
| 721 |
"proc/sys/vm/oom_adj> in B<proc>(5), and the Linux kernel source file " |
| 722 |
"I<Documentation/vm/overcommit-accounting.rst>." |
| 723 |
msgstr "" |
| 724 |
"Par défaut, Linux suit une stratégie d'allocation optimiste. Cela signifie " |
| 725 |
"que lorsque B<malloc>() ne renvoie pas NULL, il n'y a aucune garantie que la " |
| 726 |
"mémoire soit véritablement disponible. S'il devait s'avérer que le système " |
| 727 |
"manque de mémoire, un ou plusieurs processus seraient tués par «\\ OOM " |
| 728 |
"killer\\ » (gestionnaire de mémoire). Pour plus d'informations, consultez la " |
| 729 |
"description de I</proc/sys/vm/overcommit_memory> et I</proc/sys/vm/oom_adj> " |
| 730 |
"dans B<proc>(5), ainsi que le fichier I<Documentation/vm/overcommit-" |
| 731 |
"accounting.rst> dans les sources du noyau Linux." |
| 732 |
|
| 733 |
#. type: Plain text |
| 734 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 735 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 736 |
msgid "" |
| 737 |
"Normally, B<malloc>() allocates memory from the heap, and adjusts the size " |
| 738 |
"of the heap as required, using B<sbrk>(2). When allocating blocks of memory " |
| 739 |
"larger than B<MMAP_THRESHOLD> bytes, the glibc B<malloc>() implementation " |
| 740 |
"allocates the memory as a private anonymous mapping using B<mmap>(2). " |
| 741 |
"B<MMAP_THRESHOLD> is 128\\ kB by default, but is adjustable using " |
| 742 |
"B<mallopt>(3). Prior to Linux 4.7 allocations performed using B<mmap>(2) " |
| 743 |
"were unaffected by the B<RLIMIT_DATA> resource limit; since Linux 4.7, this " |
| 744 |
"limit is also enforced for allocations performed using B<mmap>(2)." |
| 745 |
msgstr "" |
| 746 |
"En général, B<malloc>() alloue la mémoire depuis le tas, et ajuste la taille " |
| 747 |
"du tas en conséquence avec B<sbrk>(2). Lorsque les blocs de mémoire alloués " |
| 748 |
"sont supérieurs à B<MMAP_THRESHOLD> octets, l'implémentation de la glibc de " |
| 749 |
"B<malloc> alloue la mémoire selon une projection anonyme privée avec " |
| 750 |
"B<mmap>(2). B<MMAP_THRESHOLD> vaut 128\\ ko par défaut et il est ajustable " |
| 751 |
"avec B<mallopt>(3). Avant Linux 4.7, les allocations réalisées avec " |
| 752 |
"B<mmap>(2) n’étaient pas affectées par la limitation de ressource " |
| 753 |
"B<RLIMIT_DATA> ; depuis Linux 4.7, cette limite est aussi prise en compte " |
| 754 |
"pour les allocations faites avec B<mmap>(2)." |
| 755 |
|
| 756 |
#. type: Plain text |
| 757 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 758 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 759 |
msgid "" |
| 760 |
"To avoid corruption in multithreaded applications, mutexes are used " |
| 761 |
"internally to protect the memory-management data structures employed by " |
| 762 |
"these functions. In a multithreaded application in which threads " |
| 763 |
"simultaneously allocate and free memory, there could be contention for these " |
| 764 |
"mutexes. To scalably handle memory allocation in multithreaded " |
| 765 |
"applications, glibc creates additional I<memory allocation arenas> if mutex " |
| 766 |
"contention is detected. Each arena is a large region of memory that is " |
| 767 |
"internally allocated by the system (using B<brk>(2) or B<mmap>(2)), and " |
| 768 |
"managed with its own mutexes." |
| 769 |
msgstr "" |
| 770 |
"Pour éviter les corruptions d'applications multithread, les mutex sont " |
| 771 |
"utilisés en interne pour protéger les structures de données de gestion de " |
| 772 |
"mémoire utilisées dans ces fonctions. Dans une application multithread où " |
| 773 |
"les threads allouent et libèrent la mémoire en même temps, ces mutex " |
| 774 |
"risquent d'entrer en conflit. Pour gérer l'allocation de mémoire de façon " |
| 775 |
"évolutive dans les applications multithread, la glibc crée des I<domaines " |
| 776 |
"d'allocation mémoire> si un conflit de mutex est détecté. Chaque domaine est " |
| 777 |
"un grand espace de mémoire qui est alloué en interne par le système (en " |
| 778 |
"utilisant B<brk>(2) ou B<mmap>(2)) et géré avec ses propres mutex." |
| 779 |
|
| 780 |
#. type: Plain text |
| 781 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 782 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 783 |
msgid "" |
| 784 |
"If your program uses a private memory allocator, it should do so by " |
| 785 |
"replacing B<malloc>(), B<free>(), B<calloc>(), and B<realloc>(). The " |
| 786 |
"replacement functions must implement the documented glibc behaviors, " |
| 787 |
"including I<errno> handling, size-zero allocations, and overflow checking; " |
| 788 |
"otherwise, other library routines may crash or operate incorrectly. For " |
| 789 |
"example, if the replacement I<free>() does not preserve I<errno>, then " |
| 790 |
"seemingly unrelated library routines may fail without having a valid reason " |
| 791 |
"in I<errno>. Private memory allocators may also need to replace other glibc " |
| 792 |
"functions; see \"Replacing malloc\" in the glibc manual for details." |
| 793 |
msgstr "" |
| 794 |
"Si votre programme utilise un allocateur de mémoire privé, il doit le faire " |
| 795 |
"en remplaçant B<malloc>(), B<free>(), B<calloc>() et B<realloc>(). Les " |
| 796 |
"fonctions de remplacement doivent implémenter les comportements de la glibc " |
| 797 |
"documentés, y compris la gestion de I<errno>, les allocations de taille " |
| 798 |
"nulle et la surveillance des dépassements ; si ce n'est pas le cas, d'autres " |
| 799 |
"routines de la bibliothèque pourront planter ou fonctionner de manière " |
| 800 |
"incorrecte. Par exemple, si la fonction qui remplace I<free>() ne préserve " |
| 801 |
"pas I<errno>, des routines de la bibliothèque apparemment sans rapport " |
| 802 |
"pourront échouer sans indiquer de raison valable dans I<errno>. Un " |
| 803 |
"allocateur de mémoire privé devra peut-être aussi remplacer d'autres " |
| 804 |
"fonctions de la glibc ; consulter « Remplacer malloc » dans le manuel de la " |
| 805 |
"glibc pour plus de détails." |
| 806 |
|
| 807 |
#. type: Plain text |
| 808 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 809 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 810 |
msgid "" |
| 811 |
"Crashes in memory allocators are almost always related to heap corruption, " |
| 812 |
"such as overflowing an allocated chunk or freeing the same pointer twice." |
| 813 |
msgstr "" |
| 814 |
"L'échec d'un allocateur de mémoire est presque toujours le signe d'une " |
| 815 |
"corruption du tas, à l'instar d'un débordement de bloc mémoire alloué ou " |
| 816 |
"d'une double libération du même pointeur." |
| 817 |
|
| 818 |
#. type: Plain text |
| 819 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 820 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 821 |
msgid "" |
| 822 |
"The B<malloc>() implementation is tunable via environment variables; see " |
| 823 |
"B<mallopt>(3) for details." |
| 824 |
msgstr "" |
| 825 |
"L'implémentation de B<malloc>() est personnalisable à l'aide des variables " |
| 826 |
"d'environnement. Pour plus de précisions, consultez B<mallopt>(3)." |
| 827 |
|
| 828 |
#. type: SS |
| 829 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 830 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 831 |
#, no-wrap |
| 832 |
msgid "Nonportable behavior" |
| 833 |
msgstr "Comportement non portable" |
| 834 |
|
| 835 |
#. type: Plain text |
| 836 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 837 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 838 |
msgid "" |
| 839 |
"The behavior of these functions when the requested size is zero is glibc " |
| 840 |
"specific; other implementations may return NULL without setting I<errno>, " |
| 841 |
"and portable POSIX programs should tolerate such behavior. See " |
| 842 |
"B<realloc>(3p)." |
| 843 |
msgstr "" |
| 844 |
"Le comportement de ces fonctions lorsque la taille demandée est égale à B<0> " |
| 845 |
"est spécifique à la glibc ; d'autres implémentations peuvent renvoyer NULL " |
| 846 |
"sans définir I<errno> et les programmes POSIX portables doivent tenir compte " |
| 847 |
"de ces comportements. Consultez B<realloc>(3p)." |
| 848 |
|
| 849 |
#. type: Plain text |
| 850 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 851 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 852 |
msgid "" |
| 853 |
"POSIX requires memory allocators to set I<errno> upon failure. However, the " |
| 854 |
"C standard does not require this, and applications portable to non-POSIX " |
| 855 |
"platforms should not assume this." |
| 856 |
msgstr "" |
| 857 |
"La norme POSIX exige des allocateurs de mémoire qu'ils renseignent I<errno> " |
| 858 |
"en cas d'erreur. Ce n'est cependant pas le cas de la norme C, et les " |
| 859 |
"applications portables vers des plateformes non-POSIX ne sont donc pas " |
| 860 |
"tenues de se plier à cette contrainte." |
| 861 |
|
| 862 |
#. type: Plain text |
| 863 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 864 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 865 |
msgid "" |
| 866 |
"Portable programs should not use private memory allocators, as POSIX and the " |
| 867 |
"C standard do not allow replacement of B<malloc>(), B<free>(), B<calloc>(), " |
| 868 |
"and B<realloc>()." |
| 869 |
msgstr "" |
| 870 |
"Les programmes portables ne doivent pas utiliser d'allocateurs de mémoire " |
| 871 |
"privés, car les normes C et POSIX n’autorisent pas le remplacement des " |
| 872 |
"fonctions B<malloc>(), B<free>(), B<calloc>() et B<realloc>()." |
| 873 |
|
| 874 |
#. type: SH |
| 875 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 876 |
#: opensuse-tumbleweed |
| 877 |
#, no-wrap |
| 878 |
msgid "BUGS" |
| 879 |
msgstr "BOGUES" |
| 880 |
|
| 881 |
#. type: Plain text |
| 882 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 883 |
#: opensuse-tumbleweed |
| 884 |
msgid "" |
| 885 |
"Programmers would naturally expect by induction that I<\\%realloc(p,\\ " |
| 886 |
"size)> is consistent with I<free(p)> and I<malloc(size)>, as that is the " |
| 887 |
"behavior in the general case. This is not explicitly required by " |
| 888 |
"POSIX.1-2024 or C11, but all conforming implementations are consistent with " |
| 889 |
"that." |
| 890 |
msgstr "" |
| 891 |
"Les programmeurs s’attendent naturellement par induction à ce que I<\\" |
| 892 |
"%realloc(p,\\ size)> soit cohérent avec I<free(p)> et I<malloc(size)>, car " |
| 893 |
"c’est le comportement adopté dans le cas général. Ce comportement n’est pas " |
| 894 |
"explicitement imposé par POSIX.1-2024 ou C11, mais toutes les " |
| 895 |
"implémentations qui s’y conforment sont en accord avec cela." |
| 896 |
|
| 897 |
#. type: Plain text |
| 898 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 899 |
#: opensuse-tumbleweed |
| 900 |
msgid "" |
| 901 |
"The glibc implementation of B<realloc>() is not consistent with that, and " |
| 902 |
"as a consequence, it is dangerous to call I<\\%realloc(p,\\ 0)> in glibc." |
| 903 |
msgstr "" |
| 904 |
"L’implémentation de B<realloc>() par la glibc n’est pas cohérente avec ce " |
| 905 |
"comportement et par voie de conséquence, il est dangereux d’utiliser I<\\" |
| 906 |
"%realloc(p,\\ 0)> avec la glibc." |
| 907 |
|
| 908 |
#. type: Plain text |
| 909 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 910 |
#: opensuse-tumbleweed |
| 911 |
msgid "" |
| 912 |
"A trivial workaround for glibc is calling it as I<\\%realloc(p,\\ size?" |
| 913 |
"size:1)>." |
| 914 |
msgstr "" |
| 915 |
"Un contournement évident pour la glibc consiste à utiliser I<\\%realloc(p,\\ " |
| 916 |
"size?size:1)>." |
| 917 |
|
| 918 |
#. type: Plain text |
| 919 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 920 |
#: opensuse-tumbleweed |
| 921 |
msgid "" |
| 922 |
"The workaround for B<reallocarray>() in glibc \\[em]which shares the same " |
| 923 |
"bug\\[em] would be I<\\%reallocarray(p,\\ n?n:1,\\ size?size:1)>." |
| 924 |
msgstr "" |
| 925 |
"Le contournement pour la version de la glibc de B<reallocarray>() \\[em]\\ " |
| 926 |
"qui partage le même bogue\\ \\[em] consisterait à utiliser I<\\" |
| 927 |
"%reallocarray(p,\\ n?n:1,\\ size?size:1)>." |
| 928 |
|
| 929 |
#. type: SH |
| 930 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 931 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 932 |
#, no-wrap |
| 933 |
msgid "EXAMPLES" |
| 934 |
msgstr "EXEMPLES" |
| 935 |
|
| 936 |
#. type: Plain text |
| 937 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 938 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 939 |
#, no-wrap |
| 940 |
msgid "" |
| 941 |
"#include E<lt>err.hE<gt>\n" |
| 942 |
"#include E<lt>stddef.hE<gt>\n" |
| 943 |
"#include E<lt>stdio.hE<gt>\n" |
| 944 |
"#include E<lt>stdlib.hE<gt>\n" |
| 945 |
"#include E<lt>string.hE<gt>\n" |
| 946 |
"\\&\n" |
| 947 |
"#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n" |
| 948 |
"#define MALLOC(type) MALLOCARRAY(1, type)\n" |
| 949 |
"\\&\n" |
| 950 |
"static inline void *my_mallocarray(size_t n, size_t size);\n" |
| 951 |
"\\&\n" |
| 952 |
"int\n" |
| 953 |
"main(void)\n" |
| 954 |
"{\n" |
| 955 |
" char *p;\n" |
| 956 |
"\\&\n" |
| 957 |
" p = MALLOCARRAY(32, char);\n" |
| 958 |
" if (p == NULL)\n" |
| 959 |
" err(EXIT_FAILURE, \"malloc\");\n" |
| 960 |
"\\&\n" |
| 961 |
" strlcpy(p, \"foo\", 32);\n" |
| 962 |
" puts(p);\n" |
| 963 |
"}\n" |
| 964 |
"\\&\n" |
| 965 |
"static inline void *\n" |
| 966 |
"my_mallocarray(size_t n, size_t size)\n" |
| 967 |
"{\n" |
| 968 |
" return reallocarray(NULL, n, size);\n" |
| 969 |
"}\n" |
| 970 |
msgstr "" |
| 971 |
"#include E<lt>err.hE<gt>\n" |
| 972 |
"#include E<lt>stddef.hE<gt>\n" |
| 973 |
"#include E<lt>stdio.hE<gt>\n" |
| 974 |
"#include E<lt>stdlib.hE<gt>\n" |
| 975 |
"#include E<lt>string.hE<gt>\n" |
| 976 |
"\\&\n" |
| 977 |
"#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n" |
| 978 |
"#define MALLOC(type) MALLOCARRAY(1, type)\n" |
| 979 |
"\\&\n" |
| 980 |
"static inline void *my_mallocarray(size_t n, size_t taille);\n" |
| 981 |
"\\&\n" |
| 982 |
"int\n" |
| 983 |
"main(void)\n" |
| 984 |
"{\n" |
| 985 |
" char *p;\n" |
| 986 |
"\\&\n" |
| 987 |
" p = MALLOCARRAY(32, char);\n" |
| 988 |
" if (p == NULL)\n" |
| 989 |
" err(EXIT_FAILURE, \"malloc\");\n" |
| 990 |
"\\&\n" |
| 991 |
" strlcpy(p, \"foo\", 32);\n" |
| 992 |
" puts(p);\n" |
| 993 |
"}\n" |
| 994 |
"\\&\n" |
| 995 |
"static inline void *\n" |
| 996 |
"my_mallocarray(size_t n, size_t taille)\n" |
| 997 |
"{\n" |
| 998 |
" return reallocarray(NULL, n, taille);\n" |
| 999 |
"}\n" |
| 1000 |
|
| 1001 |
#. type: SH |
| 1002 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1003 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1004 |
#, no-wrap |
| 1005 |
msgid "SEE ALSO" |
| 1006 |
msgstr "VOIR AUSSI" |
| 1007 |
|
| 1008 |
#. type: Plain text |
| 1009 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1010 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1011 |
msgid "" |
| 1012 |
"B<valgrind>(1), B<brk>(2), B<mmap>(2), B<alloca>(3), B<malloc_get_state>(3), " |
| 1013 |
"B<malloc_info>(3), B<malloc_trim>(3), B<malloc_usable_size>(3), " |
| 1014 |
"B<mallopt>(3), B<mcheck>(3), B<mtrace>(3), B<posix_memalign>(3)" |
| 1015 |
msgstr "" |
| 1016 |
"B<valgrind>(1), B<brk>(2), B<mmap>(2), B<alloca>(3), B<malloc_get_state>(3), " |
| 1017 |
"B<malloc_info>(3), B<malloc_trim>(3), B<malloc_usable_size>(3), " |
| 1018 |
"B<mallopt>(3), B<mcheck>(3), B<mtrace>(3), B<posix_memalign>(3)" |
| 1019 |
|
| 1020 |
#. type: Plain text |
| 1021 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1022 |
#: opensuse-tumbleweed |
| 1023 |
#, fuzzy |
| 1024 |
#| msgid "" |
| 1025 |
#| "For details of the GNU C library implementation, see E<.UR https://" |
| 1026 |
#| "sourceware.org/glibc/wiki/MallocInternals> E<.UE .>" |
| 1027 |
msgid "" |
| 1028 |
"For details of the GNU C library implementation, see E<.UR https:\\://" |
| 1029 |
"sourceware.org/glibc/wiki/MallocInternals> E<.UE .>" |
| 1030 |
msgstr "" |
| 1031 |
"Pour des détails sur l'implémentation de la bibliothèque GNU C, consulter " |
| 1032 |
"E<.UR https://sourceware.org/glibc/wiki/MallocInternals> E<.UE .>" |
| 1033 |
|
| 1034 |
#. type: TH |
| 1035 |
#: debian-trixie |
| 1036 |
#, no-wrap |
| 1037 |
msgid "2024-05-02" |
| 1038 |
msgstr "2 mai 2024" |
| 1039 |
|
| 1040 |
#. type: TH |
| 1041 |
#: debian-trixie |
| 1042 |
#, no-wrap |
| 1043 |
msgid "Linux man-pages 6.9.1" |
| 1044 |
msgstr "Pages du manuel de Linux 6.9.1" |
| 1045 |
|
| 1046 |
#. type: Plain text |
| 1047 |
#: debian-trixie |
| 1048 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 1049 |
msgstr "Bibliothèque C standard (I<libc>, I<-lc>)" |
| 1050 |
|
| 1051 |
#. type: Plain text |
| 1052 |
#: debian-trixie |
| 1053 |
#, no-wrap |
| 1054 |
msgid "" |
| 1055 |
"B<void *malloc(size_t >I<size>B<);>\n" |
| 1056 |
"B<void free(void *_Nullable >I<ptr>B<);>\n" |
| 1057 |
"B<void *calloc(size_t >I<nmemb>B<, size_t >I<size>B<);>\n" |
| 1058 |
"B<void *realloc(void *_Nullable >I<ptr>B<, size_t >I<size>B<);>\n" |
| 1059 |
"B<void *reallocarray(void *_Nullable >I<ptr>B<, size_t >I<nmemb>B<, size_t >I<size>B<);>\n" |
| 1060 |
msgstr "" |
| 1061 |
"B<void *malloc(size_t >I<taille>B<);>\n" |
| 1062 |
"B<void free(void *_Nullable >I<ptr>B<);>\n" |
| 1063 |
"B<void *calloc(size_t >I<nmemb>B<, size_t >I<taille>B<);>\n" |
| 1064 |
"B<void *realloc(void *_Nullable >I<ptr>B<, size_t >I<taille>B<);>\n" |
| 1065 |
"B<void *reallocarray(void *_Nullable >I<ptr>B<, size_t >I<nmemb>B<, size_t >I<taille>B<);>\n" |
| 1066 |
|
| 1067 |
#. type: Plain text |
| 1068 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1069 |
msgid "" |
| 1070 |
"The B<free>() function frees the memory space pointed to by I<ptr>, which " |
| 1071 |
"must have been returned by a previous call to B<malloc>() or related " |
| 1072 |
"functions. Otherwise, or if I<ptr> has already been freed, undefined " |
| 1073 |
"behavior occurs. If I<ptr> is NULL, no operation is performed." |
| 1074 |
msgstr "" |
| 1075 |
"La fonction B<free>() libère l'espace mémoire pointé par I<ptr> qui doit " |
| 1076 |
"avoir été obtenu lors d'un appel antérieur à B<malloc>() ou une fonction de " |
| 1077 |
"la même famille. Autrement, ou si I<ptr> a déjà été libéré, le comportement " |
| 1078 |
"est indéterminé. Si I<ptr> est NULL, aucune opération n'est effectuée." |
| 1079 |
|
| 1080 |
#. type: Plain text |
| 1081 |
#: debian-trixie |
| 1082 |
msgid "" |
| 1083 |
"The B<calloc>() function allocates memory for an array of I<nmemb> elements " |
| 1084 |
"of I<size> bytes each and returns a pointer to the allocated memory. The " |
| 1085 |
"memory is set to zero. If I<nmemb> or I<size> is 0, then B<calloc>() " |
| 1086 |
"returns a unique pointer value that can later be successfully passed to " |
| 1087 |
"B<free>()." |
| 1088 |
msgstr "" |
| 1089 |
"La fonction B<calloc>() alloue de la mémoire pour un tableau de I<nmemb> " |
| 1090 |
"éléments de I<taille> octets chacun et renvoie un pointeur sur la mémoire " |
| 1091 |
"allouée. La zone mémoire est initialisée avec des B<0>. Si I<nmemb> ou " |
| 1092 |
"I<taille> vaut B<0>, B<calloc>() renvoie une valeur de pointeur unique qui " |
| 1093 |
"pourra être passée ultérieurement à B<free>() avec succès." |
| 1094 |
|
| 1095 |
#. type: Plain text |
| 1096 |
#: debian-trixie |
| 1097 |
msgid "" |
| 1098 |
"If the multiplication of I<nmemb> and I<size> would result in integer " |
| 1099 |
"overflow, then B<calloc>() returns an error. By contrast, an integer " |
| 1100 |
"overflow would not be detected in the following call to B<malloc>(), with " |
| 1101 |
"the result that an incorrectly sized block of memory would be allocated:" |
| 1102 |
msgstr "" |
| 1103 |
"Si la multiplication de I<nmemb> par I<taille> provoque un dépassement " |
| 1104 |
"d'entier, B<calloc>() renvoie une erreur. Par contre, aucun dépassement " |
| 1105 |
"d'entier ne serait détecté lors de l'appel suivant à B<malloc>(), avec pour " |
| 1106 |
"conséquence l'allocation d'un bloc de mémoire incorrectement dimensionné :" |
| 1107 |
|
| 1108 |
#. type: Plain text |
| 1109 |
#: debian-trixie |
| 1110 |
#, no-wrap |
| 1111 |
msgid "malloc(nmemb * size);\n" |
| 1112 |
msgstr "malloc(nmemb * taille);\n" |
| 1113 |
|
| 1114 |
#. type: Plain text |
| 1115 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1116 |
msgid "" |
| 1117 |
"The B<realloc>() function changes the size of the memory block pointed to " |
| 1118 |
"by I<ptr> to I<size> bytes. The contents of the memory will be unchanged in " |
| 1119 |
"the range from the start of the region up to the minimum of the old and new " |
| 1120 |
"sizes. If the new size is larger than the old size, the added memory will " |
| 1121 |
"I<not> be initialized." |
| 1122 |
msgstr "" |
| 1123 |
"La fonction B<realloc>() modifie la taille du bloc de mémoire pointé par " |
| 1124 |
"I<ptr> à I<taille> octets. Le contenu de la mémoire entre la zone de départ " |
| 1125 |
"et le minimum des ancienne et nouvelle tailles n'est pas modifié. Si la " |
| 1126 |
"nouvelle taille est plus grande que l'ancienne taille, le contenu de la zone " |
| 1127 |
"de mémoire nouvellement allouée n'est I<pas> initialisé." |
| 1128 |
|
| 1129 |
#. type: Plain text |
| 1130 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1131 |
msgid "" |
| 1132 |
"If I<ptr> is NULL, then the call is equivalent to I<malloc(size)>, for all " |
| 1133 |
"values of I<size>." |
| 1134 |
msgstr "" |
| 1135 |
"Si I<ptr> est égal à NULL, l'appel est équivalent à I<malloc(taille)> pour " |
| 1136 |
"toutes les valeurs de I<taille>." |
| 1137 |
|
| 1138 |
#. type: Plain text |
| 1139 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1140 |
msgid "" |
| 1141 |
"If I<size> is equal to zero, and I<ptr> is not NULL, then the call is " |
| 1142 |
"equivalent to I<free(ptr)> (but see \"Nonportable behavior\" for portability " |
| 1143 |
"issues)." |
| 1144 |
msgstr "" |
| 1145 |
"Si I<taille> est égale à zéro et si I<ptr> est différent de NULL, l'appel " |
| 1146 |
"est équivalent à I<free(ptr)> (consulter cependant « Comportement non " |
| 1147 |
"portable » pour les problèmes de portabilité)." |
| 1148 |
|
| 1149 |
#. type: Plain text |
| 1150 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1151 |
msgid "" |
| 1152 |
"Unless I<ptr> is NULL, it must have been returned by an earlier call to " |
| 1153 |
"B<malloc> or related functions. If the area pointed to was moved, a " |
| 1154 |
"I<free(ptr)> is done." |
| 1155 |
msgstr "" |
| 1156 |
"Mis à part le cas où I<ptr> est égal à NULL, il doit avoir été renvoyé par " |
| 1157 |
"un appel précédent à B<malloc> ou à une fonction de la même famille. Si la " |
| 1158 |
"zone pointée a été déplacée, I<free(ptr)> est exécuté." |
| 1159 |
|
| 1160 |
#. type: Plain text |
| 1161 |
#: debian-trixie |
| 1162 |
msgid "" |
| 1163 |
"The B<reallocarray>() function changes the size of (and possibly moves) " |
| 1164 |
"the memory block pointed to by I<ptr> to be large enough for an array of " |
| 1165 |
"I<nmemb> elements, each of which is I<size> bytes. It is equivalent to the " |
| 1166 |
"call" |
| 1167 |
msgstr "" |
| 1168 |
"La fonction B<reallocarray>() déplace éventuellement le bloc mémoire pointé " |
| 1169 |
"par I<ptr> et change sa taille pour qu'il soit suffisamment grand pour " |
| 1170 |
"contenir un tableau de I<nmemb> éléments faisant chacun I<taille> octets. " |
| 1171 |
"Elle équivaut à l'appel" |
| 1172 |
|
| 1173 |
#. type: Plain text |
| 1174 |
#: debian-trixie |
| 1175 |
#, no-wrap |
| 1176 |
msgid "realloc(ptr, nmemb * size);\n" |
| 1177 |
msgstr "realloc(ptr, nmemb * taille);\n" |
| 1178 |
|
| 1179 |
#. type: Plain text |
| 1180 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1181 |
msgid "" |
| 1182 |
"The B<realloc>() and B<reallocarray>() functions return NULL if I<ptr> is " |
| 1183 |
"not NULL and the requested size is zero; this is not considered an error. " |
| 1184 |
"(See \"Nonportable behavior\" for portability issues.) Otherwise, the " |
| 1185 |
"returned pointer may be the same as I<ptr> if the allocation was not moved " |
| 1186 |
"(e.g., there was room to expand the allocation in-place), or different from " |
| 1187 |
"I<ptr> if the allocation was moved to a new address. If these functions " |
| 1188 |
"fail, the original block is left untouched; it is not freed or moved." |
| 1189 |
msgstr "" |
| 1190 |
"Les fonctions B<realloc>() et B<reallocarray>() renvoient NULL si I<ptr> est " |
| 1191 |
"différent de NULL et si la taille demandée est égale à zéro, ce qui n'est " |
| 1192 |
"pas considéré comme une erreur (consulter « Comportement non portable » pour " |
| 1193 |
"les problèmes de portabilité). Dans le cas contraire, le pointeur renvoyé " |
| 1194 |
"peut être identique à I<ptr> si la zone mémoire n'a pas été déplacée (par " |
| 1195 |
"exemple s'il y a assez de place pour l'étendre à son emplacement), ou peut " |
| 1196 |
"être différent de I<ptr> si la zone mémoire a été déplacée à une nouvelle " |
| 1197 |
"adresse. Si ces fonctions échouent, le bloc mémoire originel reste intact ; " |
| 1198 |
"il n'est ni libéré ni déplacé." |
| 1199 |
|
| 1200 |
#. type: Plain text |
| 1201 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1202 |
msgid "C11, POSIX.1-2008." |
| 1203 |
msgstr "C11, POSIX.1-2008." |
| 1204 |
|
| 1205 |
#. type: Plain text |
| 1206 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1207 |
msgid "None." |
| 1208 |
msgstr "Aucun." |
| 1209 |
|
| 1210 |
#. type: Plain text |
| 1211 |
#: debian-trixie |
| 1212 |
#, no-wrap |
| 1213 |
msgid "" |
| 1214 |
"#include E<lt>err.hE<gt>\n" |
| 1215 |
"#include E<lt>stddef.hE<gt>\n" |
| 1216 |
"#include E<lt>stdio.hE<gt>\n" |
| 1217 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1218 |
"#include E<lt>string.hE<gt>\n" |
| 1219 |
"\\&\n" |
| 1220 |
"#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n" |
| 1221 |
"#define MALLOC(type) MALLOCARRAY(1, type)\n" |
| 1222 |
"\\&\n" |
| 1223 |
"static inline void *my_mallocarray(size_t nmemb, size_t size);\n" |
| 1224 |
"\\&\n" |
| 1225 |
"int\n" |
| 1226 |
"main(void)\n" |
| 1227 |
"{\n" |
| 1228 |
" char *p;\n" |
| 1229 |
"\\&\n" |
| 1230 |
" p = MALLOCARRAY(32, char);\n" |
| 1231 |
" if (p == NULL)\n" |
| 1232 |
" err(EXIT_FAILURE, \"malloc\");\n" |
| 1233 |
"\\&\n" |
| 1234 |
" strlcpy(p, \"foo\", 32);\n" |
| 1235 |
" puts(p);\n" |
| 1236 |
"}\n" |
| 1237 |
"\\&\n" |
| 1238 |
"static inline void *\n" |
| 1239 |
"my_mallocarray(size_t nmemb, size_t size)\n" |
| 1240 |
"{\n" |
| 1241 |
" return reallocarray(NULL, nmemb, size);\n" |
| 1242 |
"}\n" |
| 1243 |
msgstr "" |
| 1244 |
"#include E<lt>err.hE<gt>\n" |
| 1245 |
"#include E<lt>stddef.hE<gt>\n" |
| 1246 |
"#include E<lt>stdio.hE<gt>\n" |
| 1247 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1248 |
"#include E<lt>string.hE<gt>\n" |
| 1249 |
"\\&\n" |
| 1250 |
"#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n" |
| 1251 |
"#define MALLOC(type) MALLOCARRAY(1, type)\n" |
| 1252 |
"\\&\n" |
| 1253 |
"static inline void *my_mallocarray(size_t nmemb, size_t taille);\n" |
| 1254 |
"\\&\n" |
| 1255 |
"int\n" |
| 1256 |
"main(void)\n" |
| 1257 |
"{\n" |
| 1258 |
" char *p;\n" |
| 1259 |
"\\&\n" |
| 1260 |
" p = MALLOCARRAY(32, char);\n" |
| 1261 |
" if (p == NULL)\n" |
| 1262 |
" err(EXIT_FAILURE, \"malloc\");\n" |
| 1263 |
"\\&\n" |
| 1264 |
" strlcpy(p, \"foo\", 32);\n" |
| 1265 |
" puts(p);\n" |
| 1266 |
"}\n" |
| 1267 |
"\\&\n" |
| 1268 |
"static inline void *\n" |
| 1269 |
"my_mallocarray(size_t nmemb, size_t taille)\n" |
| 1270 |
"{\n" |
| 1271 |
" return reallocarray(NULL, nmemb, taille);\n" |
| 1272 |
"}\n" |
| 1273 |
|
| 1274 |
#. type: Plain text |
| 1275 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1276 |
msgid "" |
| 1277 |
"For details of the GNU C library implementation, see E<.UR https://" |
| 1278 |
"sourceware.org/glibc/wiki/MallocInternals> E<.UE .>" |
| 1279 |
msgstr "" |
| 1280 |
"Pour des détails sur l'implémentation de la bibliothèque GNU C, consulter " |
| 1281 |
"E<.UR https://sourceware.org/glibc/wiki/MallocInternals> E<.UE .>" |
| 1282 |
|
| 1283 |
#. type: TH |
| 1284 |
#: fedora-44 fedora-rawhide |
| 1285 |
#, no-wrap |
| 1286 |
msgid "2024-11-17" |
| 1287 |
msgstr "17 novembre 2024" |
| 1288 |
|
| 1289 |
#. type: TH |
| 1290 |
#: fedora-44 fedora-rawhide |
| 1291 |
#, no-wrap |
| 1292 |
msgid "Linux man-pages 6.13" |
| 1293 |
msgstr "Pages du manuel de Linux 6.13" |
| 1294 |
|
| 1295 |
#. type: Plain text |
| 1296 |
#: fedora-44 fedora-rawhide |
| 1297 |
#, no-wrap |
| 1298 |
msgid "" |
| 1299 |
"B<void *malloc(size_t >I<size>B<);>\n" |
| 1300 |
"B<void free(void *_Nullable >I<ptr>B<);>\n" |
| 1301 |
"B<void *calloc(size_t >I<n>B<, size_t >I<size>B<);>\n" |
| 1302 |
"B<void *realloc(void *_Nullable >I<ptr>B<, size_t >I<size>B<);>\n" |
| 1303 |
"B<void *reallocarray(void *_Nullable >I<ptr>B<, size_t >I<n>B<, size_t >I<size>B<);>\n" |
| 1304 |
msgstr "" |
| 1305 |
"B<void *malloc(size_t >I<taille>B<);>\n" |
| 1306 |
"B<void free(void *_Nullable >I<ptr>B<);>\n" |
| 1307 |
"B<void *calloc(size_t >I<n>B<, size_t >I<taille>B<);>\n" |
| 1308 |
"B<void *realloc(void *_Nullable >I<ptr>B<, size_t >I<taille>B<);>\n" |
| 1309 |
"B<void *reallocarray(void *_Nullable >I<ptr>B<, size_t >I<n>B<, size_t >I<taille>B<);>\n" |
| 1310 |
|
| 1311 |
#. type: Plain text |
| 1312 |
#: fedora-44 fedora-rawhide |
| 1313 |
msgid "" |
| 1314 |
"The B<reallocarray>() function changes the size of (and possibly moves) " |
| 1315 |
"the memory block pointed to by I<ptr> to be large enough for an array of " |
| 1316 |
"I<n> elements, each of which is I<size> bytes. It is equivalent to the call" |
| 1317 |
msgstr "" |
| 1318 |
"La fonction B<reallocarray>() déplace éventuellement le bloc mémoire pointé " |
| 1319 |
"par I<ptr> et change sa taille pour qu'il soit suffisamment grand pour " |
| 1320 |
"contenir un tableau de I<n> éléments faisant chacun I<taille> octets. Elle " |
| 1321 |
"équivaut à l'appel" |
| 1322 |
|
| 1323 |
#. type: Plain text |
| 1324 |
#: fedora-44 fedora-rawhide |
| 1325 |
#, no-wrap |
| 1326 |
msgid "realloc(ptr, n * size);\n" |
| 1327 |
msgstr "realloc(ptr, n * taille);\n" |
| 1328 |
|
| 1329 |
#. type: TH |
| 1330 |
#: mageia-cauldron |
| 1331 |
#, no-wrap |
| 1332 |
msgid "Linux man-pages 6.17" |
| 1333 |
msgstr "Pages du manuel de Linux 6.17" |
| 1334 |
|
| 1335 |
#. type: TH |
| 1336 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1337 |
#, no-wrap |
| 1338 |
msgid "Linux man-pages (unreleased)" |
| 1339 |
msgstr "Pages du manuel de Linux (non publiées)" |