# French translation of manpages # This file is distributed under the same license as the manpages-l10n package. # Copyright © of this file: # Christophe Blaess , 1996-2003. # Stéphan Rafin , 2002. # Thierry Vignaud , 1999, 2002. # François Micaux, 2002. # Alain Portal , 2003-2008. # Jean-Philippe Guérard , 2005-2006. # Jean-Luc Coulon (f5ibh) , 2006-2007. # Julien Cristau , 2006-2007. # Thomas Huriaux , 2006-2008. # Nicolas François , 2006-2008. # Florentin Duneau , 2006-2010. # Simon Paillard , 2006, 2013. # Denis Barbier , 2006, 2010. # David Prévot , 2010, 2012-2014. # Grégoire Scano , 2020-2021. # Lucien Gentis , 2023-2025. msgid "" msgstr "" "Project-Id-Version: manpages-l10n 4.21.0\n" "POT-Creation-Date: 2026-06-05 06:30+0200\n" "PO-Revision-Date: 2026-01-06 16:06+0100\n" "Last-Translator: Lucien Gentis \n" "Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: vim-gtk3\n" #. type: TH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "malloc" msgstr "malloc" #. type: TH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "2026-02-08" msgstr "8 février 2026" #. type: TH #: archlinux debian-unstable #, no-wrap msgid "Linux man-pages 6.18" msgstr "Pages du manuel de Linux 6.18" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "NOM" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "malloc, free, calloc, realloc, reallocarray - allocate and free dynamic " "memory" msgstr "" "malloc, free, calloc, realloc, reallocarray — Allocation et libération de " "mémoire dynamique" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "BIBLIOTHÈQUE" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "Standard C library (I,\\ I<-lc>)" msgstr "Bibliothèque C standard (I,\\ I<-lc>)" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "SYNOPSIS" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B<#include Estdlib.hE>\n" msgstr "B<#include Estdlib.hE>\n" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "" "BIB<);>\n" "BI

B<);>\n" "BIB<, size_t >IB<);>\n" "BI

B<, size_t >IB<);>\n" "BI

B<, size_t >IB<, size_t >IB<);>\n" msgstr "" "BIB<);>\n" "BI

B<);>\n" "BIB<, size_t >IB<);>\n" "BI

B<, size_t >IB<);>\n" "BI

B<, size_t >IB<, size_t >IB<);>\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Feature Test Macro Requirements for glibc (see B(7)):" msgstr "" "Exigences de macros de test de fonctionnalités pour la glibc (consulter " "B(7)) :" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "B():" msgstr "B() :" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" " Since glibc 2.29:\n" " _DEFAULT_SOURCE\n" " glibc 2.28 and earlier:\n" " _GNU_SOURCE\n" msgstr "" " Depuis la glibc 2.29 :\n" " _DEFAULT_SOURCE\n" " glibc 2.28 et précédentes :\n" " _GNU_SOURCE\n" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "DESCRIPTION" #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "malloc()" msgstr "malloc()" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() function allocates I bytes and returns a pointer to " "the allocated memory. I. If I is 0, " "then B() returns a unique pointer value that can later be " "successfully passed to B(). (See \"Nonportable behavior\" for " "portability issues.)" msgstr "" "La fonction B() alloue I octets et renvoie un pointeur sur " "la mémoire allouée. I. Si I est nulle, B renvoie une valeur de " "pointeur unique qui pourra être passée ultérieurement à B() avec " "succès (consulter « Comportement non portable » pour les problèmes de " "portabilité)." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "free()" msgstr "free()" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "The B() function frees the memory space pointed to by I

, which " "must have been returned by a previous call to B() or related " "functions. Otherwise, or if I

has already been freed, undefined behavior " "occurs. If I

is NULL, no operation is performed." msgstr "" "La fonction B() libère l'espace mémoire pointé par I

qui doit avoir " "été obtenu lors d'un appel antérieur à B() ou une fonction de la " "même famille. Autrement, ou si I

a déjà été libéré, le comportement est " "indéterminé. Si I

est NULL, aucune opération n'est effectuée." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "calloc()" msgstr "calloc()" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() function allocates memory for an array of I elements of " "I bytes each and returns a pointer to the allocated memory. The " "memory is set to zero. If I or I is 0, then B() returns a " "unique pointer value that can later be successfully passed to B()." msgstr "" "La fonction B() alloue de la mémoire pour un tableau de I " "éléments de I octets chacun et renvoie un pointeur sur la mémoire " "allouée. La zone mémoire est initialisée avec des B<0>. Si I ou I " "vaut B<0>, B() renvoie une valeur de pointeur unique qui pourra être " "passée ultérieurement à B() avec succès." #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If the multiplication of I and I would result in integer overflow, " "then B() returns an error. By contrast, an integer overflow would " "not be detected in the following call to B(), with the result that " "an incorrectly sized block of memory would be allocated:" msgstr "" "Si la multiplication de I par I provoque un dépassement d'entier, " "B() renvoie une erreur. Par contre, aucun dépassement d'entier ne " "serait détecté lors de l'appel suivant à B(), avec pour conséquence " "l'allocation d'un bloc de mémoire incorrectement dimensionné :" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "malloc(n * size);\n" msgstr "malloc(n * taille);\n" #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "realloc()" msgstr "realloc()" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "The B() function changes the size of the memory block pointed to " "by I

to I bytes. The contents of the memory will be unchanged in " "the range from the start of the region up to the minimum of the old and new " "sizes. If the new size is larger than the old size, the added memory will " "I be initialized." msgstr "" "La fonction B() modifie la taille du bloc de mémoire pointé par " "I

à I octets. Le contenu de la mémoire entre la zone de départ et " "le minimum des ancienne et nouvelle tailles n'est pas modifié. Si la " "nouvelle taille est plus grande que l'ancienne taille, le contenu de la zone " "de mémoire nouvellement allouée n'est I initialisé." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "If I

is NULL, then the call is equivalent to I, for all " "values of I." msgstr "" "Si I

est égal à NULL, l'appel est équivalent à I pour " "toutes les valeurs de I." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "If I is equal to zero, and I

is not NULL, then the call is " "equivalent to I (but see \"Nonportable behavior\" for portability " "issues)." msgstr "" "Si I est égale à zéro et si I

est différent de NULL, l'appel est " "équivalent à I (consulter cependant « Comportement non portable » " "pour les problèmes de portabilité)." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "Unless I

is NULL, it must have been returned by an earlier call to " "B or related functions. If the area pointed to was moved, a " "I is done." msgstr "" "Excepté le cas où I

est égal à NULL, il doit avoir été renvoyé par un " "appel précédent à B ou à une fonction de la même famille. Si la zone " "pointée a été déplacée, l'appel I est effectué." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "reallocarray()" msgstr "reallocarray()" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "The B() function changes the size of (and possibly moves) " "the memory block pointed to by I

to be large enough for an array of I " "elements, each of which is I bytes. It is equivalent to the call" msgstr "" "La fonction B() déplace éventuellement le bloc mémoire pointé " "par I

et change sa taille pour qu'il soit suffisamment grand pour " "contenir un tableau de I éléments faisant chacun I octets. Elle " "équivaut à l'appel" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "realloc(p, n * size);\n" msgstr "realloc(p, n * taille);\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "However, unlike that B() call, B() fails safely in " "the case where the multiplication would overflow. If such an overflow " "occurs, B() returns an error." msgstr "" "Cependant, contrairement à cet appel de B(), B() " "échoue pour éviter tout problème dans le cas où la multiplication " "entraînerait un dépassement. Si un tel dépassement se produit, " "B() renvoie une erreur." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "RETURN VALUE" msgstr "VALEUR RENVOYÉE" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B(), B(), B(), and B() functions " "return a pointer to the allocated memory, which is suitably aligned for any " "type that fits into the requested size or less. On error, these functions " "return NULL and set I. Attempting to allocate more than " "B bytes is considered an error, as an object that large could " "cause later pointer subtraction to overflow." msgstr "" "Les fonctions B(), B(), B() et B() " "renvoient un pointeur vers la mémoire allouée qui est correctement alignée " "pour n'importe quel type dont la taille correspondra à la taille demandée ou " "sera inférieure à cette dernière. Si elles échouent, elles renvoient NULL et " "définissent I pour indiquer l'erreur. Essayer d'allouer plus que " "B octets est considéré comme une erreur, car un objet de cette " "taille pourrait provoquer un dépassement lors d'une soustraction de pointeur " "ultérieure." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "The B() function returns no value, and preserves I." msgstr "La fonction B() ne renvoie aucune valeur et préserve I." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "The B() and B() functions return NULL if I

is " "not NULL and the requested size is zero; this is not considered an error. " "(See \"Nonportable behavior\" for portability issues.) Otherwise, the " "returned pointer may be the same as I

if the allocation was not moved " "(e.g., there was room to expand the allocation in-place), or different from " "I

if the allocation was moved to a new address. If these functions fail, " "the original block is left untouched; it is not freed or moved." msgstr "" "Les fonction B() et B() renvoient NULL si I

est " "différent de NULL et si la taille demandée est égale à zéro, ce qui n'est " "pas considéré comme une erreur (consulter « Comportement non portable » pour " "les problèmes de portabilité). Dans le cas contraire, le pointeur renvoyé " "peut être identique à I

si la zone mémoire n'a pas été déplacée (par " "exemple s'il y a assez de place pour l'étendre à son emplacement), ou peut " "être différent de I

si la zone mémoire a été déplacée à une nouvelle " "adresse. Si ces fonctions échouent, le bloc mémoire originel reste intact ; " "il n'est ni libéré ni déplacé." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "ERRORS" msgstr "ERREURS" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "B(), B(), B(), and B() can fail with " "the following error:" msgstr "" "B(), B(), B() et B() peuvent échouer " "avec l'erreur suivante :" #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Out of memory. Possibly, the application hit the B or " "B limit described in B(2). Another reason could be " "that the number of mappings created by the caller process exceeded the limit " "specified by I." msgstr "" "Plus de mémoire. Il est possible que l'application ait atteint les limites " "B ou B décrites dans B(2). Une autre " "raison pourrait être que le nombre de mappages créés par le processus " "appelant dépasse la limite spécifiée par I." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "ATTRIBUTES" msgstr "ATTRIBUTS" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "For an explanation of the terms used in this section, see B(7)." msgstr "" "Pour une explication des termes utilisés dans cette section, consulter " "B(7)." #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Interface" msgstr "Interface" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Attribute" msgstr "Attribut" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Value" msgstr "Valeur" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid ".na\n" msgstr ".na\n" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid ".nh\n" msgstr ".nh\n" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "B(),\n" "B(),\n" "B(),\n" "B()" msgstr "" "B(),\n" "B(),\n" "B(),\n" "B()" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Thread safety" msgstr "Sécurité des threads" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "MT-Safe" msgstr "MT-Safe" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "STANDARDS" msgstr "NORMES" #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "B()" #. type: TQ #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "B()" #. type: TQ #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "B()" #. type: TQ #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "B()" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "C23, POSIX.1-2024." msgstr "C23, POSIX.1-2024." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "B()" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "POSIX.1-2024." msgstr "POSIX.1-2024." #. type: SS #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "realloc(p, 0)" msgstr "realloc(p, 0)" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "The behavior of I in glibc doesn't conform to any of C99, " "C11, POSIX.1-2001, POSIX.1-2004, POSIX.1-2008, POSIX.1-2013, POSIX.1-2017, " "or POSIX.1-2024. The C17 specification was changed to make it conforming, " "but that specification made it impossible to write code that reliably " "determines if the input pointer is freed after I, and C23 " "changed it again to make this undefined behavior, acknowledging that the C17 " "specification was broad enough, so that undefined behavior wasn't worse than " "that." msgstr "" "Le comportement de I dans la glibc n’est conforme à aucune " "des normes C99, C11, POSIX.1-2001, POSIX.1-2004, POSIX.1-2008, POSIX.1-2013, " "POSIX.1-2017 ou POSIX.1-2024. La spécification C17 a été modifiée pour " "mettre cette fonction en conformité, mais cette spécification a rendu " "impossible l’écriture d’un code qui déterminerait de manière fiable si le " "pointeur d’entrée a été libéré après l’appel de I, et C23 a " "encore modifié les choses pour rendre ce comportement indéterminé, en " "assumant que la spécification C17 était suffisamment vaste, si bien qu’un " "comportement indéterminé n’était pas pire que ça." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "B() suffers the same issues in glibc." msgstr "B() souffre du même problème dans la glibc." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "musl libc and the BSDs conform to all versions of ISO C and POSIX.1." msgstr "" "La libc de B et celle de BSD sont conformes à toutes les versions de " "ISO C et POSIX.1." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "gnulib provides the I module, which provides wrappers " "B() and B() that conform to all versions of ISO C " "and POSIX.1." msgstr "" "gnulib propose le module I fournissant les programmes " "enveloppe B() et B() qui sont conformes à toutes les " "versions de ISO C." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, fuzzy #| msgid "" #| "There's a proposal to standardize the BSD behavior: E<.UR https://" #| "www.open-std.org/\\:jtc1/\\:sc22/\\:wg14/\\:www/\\:docs/\\:n3621.txt> " #| "E<.UE .>" msgid "" "There's a proposal to standardize the BSD behavior: E<.UR https:\\://" "www.open-std.org/\\:jtc1/\\:sc22/\\:wg14/\\:www/\\:docs/\\:n3621.txt> " "E<.UE .>" msgstr "" "Il existe un projet de standardiser le comportement de BSD : E<.UR https://" "www.open-std.org/\\:jtc1/\\:sc22/\\:wg14/\\:www/\\:docs/\\:n3621.txt> E<.UE>." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "HISTORY" msgstr "HISTORIQUE" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "POSIX.1-2001, C89." msgstr "POSIX.1-2001, C89." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "glibc 2.26. OpenBSD 5.6, FreeBSD 11.0." msgstr "glibc 2.26. OpenBSD 5.6, FreeBSD 11.0." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "B() and related functions rejected sizes greater than " "B starting in glibc 2.30." msgstr "" "Depuis la glibc 2.30, B() et les fonctions de la même famille " "refusent les tailles supérieures à B." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "B() preserved I starting in glibc 2.33." msgstr "Depuis la glibc 2.33, B() préserve I." #. type: SS #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "realloc(p,\\ 0)" msgstr "realloc(p,\\ 0)" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "C89 was ambiguous in its specification of I. C99 partially " "fixed this." msgstr "" "C89 était ambigu quant à sa spécification de I. C99 y " "remédie partiellement." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "The original implementation in glibc would have been conforming to C99. " "However, and ironically, trying to comply with C99 before the standard was " "released, glibc changed its behavior in glibc 2.1.1 into something that " "ended up not conforming to the final C99 specification (but this is debated, " "as the wording of the standard seems self-contradicting)." msgstr "" "L’implémentation originelle dans la glibc aurait été conforme à C99. " "Cependant, et ironiquement, en essayant de se conformer à C99 avant que la " "norme ne soit écrite, glibc modifia son comportement à partir de glibc 2.1.1 " "pour quelque chose qui s’avéra en fin de compte non conforme à la " "spécification finale de C99 (mais cela est débattu, car la formulation de la " "norme semble se contredire elle-même)." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "NOTES" msgstr "NOTES" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "By default, Linux follows an optimistic memory allocation strategy. This " "means that when B() returns non-NULL there is no guarantee that the " "memory really is available. In case it turns out that the system is out of " "memory, one or more processes will be killed by the OOM killer. For more " "information, see the description of I and I in B(5), and the Linux kernel source file " "I." msgstr "" "Par défaut, Linux suit une stratégie d'allocation optimiste. Cela signifie " "que lorsque B() ne renvoie pas NULL, il n'y a aucune garantie que la " "mémoire soit véritablement disponible. S'il devait s'avérer que le système " "manque de mémoire, un ou plusieurs processus seraient tués par «\\ OOM " "killer\\ » (gestionnaire de mémoire). Pour plus d'informations, consultez la " "description de I et I " "dans B(5), ainsi que le fichier I dans les sources du noyau Linux." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Normally, B() allocates memory from the heap, and adjusts the size " "of the heap as required, using B(2). When allocating blocks of memory " "larger than B bytes, the glibc B() implementation " "allocates the memory as a private anonymous mapping using B(2). " "B is 128\\ kB by default, but is adjustable using " "B(3). Prior to Linux 4.7 allocations performed using B(2) " "were unaffected by the B resource limit; since Linux 4.7, this " "limit is also enforced for allocations performed using B(2)." msgstr "" "En général, B() alloue la mémoire depuis le tas, et ajuste la taille " "du tas en conséquence avec B(2). Lorsque les blocs de mémoire alloués " "sont supérieurs à B octets, l'implémentation de la glibc de " "B alloue la mémoire selon une projection anonyme privée avec " "B(2). B vaut 128\\ ko par défaut et il est ajustable " "avec B(3). Avant Linux 4.7, les allocations réalisées avec " "B(2) n’étaient pas affectées par la limitation de ressource " "B ; depuis Linux 4.7, cette limite est aussi prise en compte " "pour les allocations faites avec B(2)." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "To avoid corruption in multithreaded applications, mutexes are used " "internally to protect the memory-management data structures employed by " "these functions. In a multithreaded application in which threads " "simultaneously allocate and free memory, there could be contention for these " "mutexes. To scalably handle memory allocation in multithreaded " "applications, glibc creates additional I if mutex " "contention is detected. Each arena is a large region of memory that is " "internally allocated by the system (using B(2) or B(2)), and " "managed with its own mutexes." msgstr "" "Pour éviter les corruptions d'applications multithread, les mutex sont " "utilisés en interne pour protéger les structures de données de gestion de " "mémoire utilisées dans ces fonctions. Dans une application multithread où " "les threads allouent et libèrent la mémoire en même temps, ces mutex " "risquent d'entrer en conflit. Pour gérer l'allocation de mémoire de façon " "évolutive dans les applications multithread, la glibc crée des I si un conflit de mutex est détecté. Chaque domaine est " "un grand espace de mémoire qui est alloué en interne par le système (en " "utilisant B(2) ou B(2)) et géré avec ses propres mutex." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If your program uses a private memory allocator, it should do so by " "replacing B(), B(), B(), and B(). The " "replacement functions must implement the documented glibc behaviors, " "including I handling, size-zero allocations, and overflow checking; " "otherwise, other library routines may crash or operate incorrectly. For " "example, if the replacement I() does not preserve I, then " "seemingly unrelated library routines may fail without having a valid reason " "in I. Private memory allocators may also need to replace other glibc " "functions; see \"Replacing malloc\" in the glibc manual for details." msgstr "" "Si votre programme utilise un allocateur de mémoire privé, il doit le faire " "en remplaçant B(), B(), B() et B(). Les " "fonctions de remplacement doivent implémenter les comportements de la glibc " "documentés, y compris la gestion de I, les allocations de taille " "nulle et la surveillance des dépassements ; si ce n'est pas le cas, d'autres " "routines de la bibliothèque pourront planter ou fonctionner de manière " "incorrecte. Par exemple, si la fonction qui remplace I() ne préserve " "pas I, des routines de la bibliothèque apparemment sans rapport " "pourront échouer sans indiquer de raison valable dans I. Un " "allocateur de mémoire privé devra peut-être aussi remplacer d'autres " "fonctions de la glibc ; consulter « Remplacer malloc » dans le manuel de la " "glibc pour plus de détails." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Crashes in memory allocators are almost always related to heap corruption, " "such as overflowing an allocated chunk or freeing the same pointer twice." msgstr "" "L'échec d'un allocateur de mémoire est presque toujours le signe d'une " "corruption du tas, à l'instar d'un débordement de bloc mémoire alloué ou " "d'une double libération du même pointeur." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() implementation is tunable via environment variables; see " "B(3) for details." msgstr "" "L'implémentation de B() est personnalisable à l'aide des variables " "d'environnement. Pour plus de précisions, consultez B(3)." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Nonportable behavior" msgstr "Comportement non portable" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The behavior of these functions when the requested size is zero is glibc " "specific; other implementations may return NULL without setting I, " "and portable POSIX programs should tolerate such behavior. See " "B(3p)." msgstr "" "Le comportement de ces fonctions lorsque la taille demandée est égale à B<0> " "est spécifique à la glibc ; d'autres implémentations peuvent renvoyer NULL " "sans définir I et les programmes POSIX portables doivent tenir compte " "de ces comportements. Consultez B(3p)." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "POSIX requires memory allocators to set I upon failure. However, the " "C standard does not require this, and applications portable to non-POSIX " "platforms should not assume this." msgstr "" "La norme POSIX exige des allocateurs de mémoire qu'ils renseignent I " "en cas d'erreur. Ce n'est cependant pas le cas de la norme C, et les " "applications portables vers des plateformes non-POSIX ne sont donc pas " "tenues de se plier à cette contrainte." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Portable programs should not use private memory allocators, as POSIX and the " "C standard do not allow replacement of B(), B(), B(), " "and B()." msgstr "" "Les programmes portables ne doivent pas utiliser d'allocateurs de mémoire " "privés, car les normes C et POSIX n’autorisent pas le remplacement des " "fonctions B(), B(), B() et B()." #. type: SH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "BUGS" msgstr "BOGUES" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "Programmers would naturally expect by induction that I<\\%realloc(p,\\ " "size)> is consistent with I and I, as that is the " "behavior in the general case. This is not explicitly required by " "POSIX.1-2024 or C11, but all conforming implementations are consistent with " "that." msgstr "" "Les programmeurs s’attendent naturellement par induction à ce que I<\\" "%realloc(p,\\ size)> soit cohérent avec I et I, car " "c’est le comportement adopté dans le cas général. Ce comportement n’est pas " "explicitement imposé par POSIX.1-2024 ou C11, mais toutes les " "implémentations qui s’y conforment sont en accord avec cela." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "The glibc implementation of B() is not consistent with that, and " "as a consequence, it is dangerous to call I<\\%realloc(p,\\ 0)> in glibc." msgstr "" "L’implémentation de B() par la glibc n’est pas cohérente avec ce " "comportement et par voie de conséquence, il est dangereux d’utiliser I<\\" "%realloc(p,\\ 0)> avec la glibc." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "A trivial workaround for glibc is calling it as I<\\%realloc(p,\\ size?" "size:1)>." msgstr "" "Un contournement évident pour la glibc consiste à utiliser I<\\%realloc(p,\\ " "size?size:1)>." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "The workaround for B() in glibc \\[em]which shares the same " "bug\\[em] would be I<\\%reallocarray(p,\\ n?n:1,\\ size?size:1)>." msgstr "" "Le contournement pour la version de la glibc de B() \\[em]\\ " "qui partage le même bogue\\ \\[em] consisterait à utiliser I<\\" "%reallocarray(p,\\ n?n:1,\\ size?size:1)>." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "EXAMPLES" msgstr "EXEMPLES" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "#include Eerr.hE\n" "#include Estddef.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\n" "\\&\n" "#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n" "#define MALLOC(type) MALLOCARRAY(1, type)\n" "\\&\n" "static inline void *my_mallocarray(size_t n, size_t size);\n" "\\&\n" "int\n" "main(void)\n" "{\n" " char *p;\n" "\\&\n" " p = MALLOCARRAY(32, char);\n" " if (p == NULL)\n" " err(EXIT_FAILURE, \"malloc\");\n" "\\&\n" " strlcpy(p, \"foo\", 32);\n" " puts(p);\n" "}\n" "\\&\n" "static inline void *\n" "my_mallocarray(size_t n, size_t size)\n" "{\n" " return reallocarray(NULL, n, size);\n" "}\n" msgstr "" "#include Eerr.hE\n" "#include Estddef.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\n" "\\&\n" "#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n" "#define MALLOC(type) MALLOCARRAY(1, type)\n" "\\&\n" "static inline void *my_mallocarray(size_t n, size_t taille);\n" "\\&\n" "int\n" "main(void)\n" "{\n" " char *p;\n" "\\&\n" " p = MALLOCARRAY(32, char);\n" " if (p == NULL)\n" " err(EXIT_FAILURE, \"malloc\");\n" "\\&\n" " strlcpy(p, \"foo\", 32);\n" " puts(p);\n" "}\n" "\\&\n" "static inline void *\n" "my_mallocarray(size_t n, size_t taille)\n" "{\n" " return reallocarray(NULL, n, taille);\n" "}\n" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "SEE ALSO" msgstr "VOIR AUSSI" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "B(1), B(2), B(2), B(3), B(3), " "B(3), B(3), B(3), " "B(3), B(3), B(3), B(3)" msgstr "" "B(1), B(2), B(2), B(3), B(3), " "B(3), B(3), B(3), " "B(3), B(3), B(3), B(3)" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, fuzzy #| msgid "" #| "For details of the GNU C library implementation, see E<.UR https://" #| "sourceware.org/glibc/wiki/MallocInternals> E<.UE .>" msgid "" "For details of the GNU C library implementation, see E<.UR https:\\://" "sourceware.org/glibc/wiki/MallocInternals> E<.UE .>" msgstr "" "Pour des détails sur l'implémentation de la bibliothèque GNU C, consulter " "E<.UR https://sourceware.org/glibc/wiki/MallocInternals> E<.UE .>" #. type: TH #: debian-trixie #, no-wrap msgid "2024-05-02" msgstr "2 mai 2024" #. type: TH #: debian-trixie #, no-wrap msgid "Linux man-pages 6.9.1" msgstr "Pages du manuel de Linux 6.9.1" #. type: Plain text #: debian-trixie msgid "Standard C library (I, I<-lc>)" msgstr "Bibliothèque C standard (I, I<-lc>)" #. type: Plain text #: debian-trixie #, no-wrap msgid "" "BIB<);>\n" "BIB<);>\n" "BIB<, size_t >IB<);>\n" "BIB<, size_t >IB<);>\n" "BIB<, size_t >IB<, size_t >IB<);>\n" msgstr "" "BIB<);>\n" "BIB<);>\n" "BIB<, size_t >IB<);>\n" "BIB<, size_t >IB<);>\n" "BIB<, size_t >IB<, size_t >IB<);>\n" #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "" "The B() function frees the memory space pointed to by I, which " "must have been returned by a previous call to B() or related " "functions. Otherwise, or if I has already been freed, undefined " "behavior occurs. If I is NULL, no operation is performed." msgstr "" "La fonction B() libère l'espace mémoire pointé par I qui doit " "avoir été obtenu lors d'un appel antérieur à B() ou une fonction de " "la même famille. Autrement, ou si I a déjà été libéré, le comportement " "est indéterminé. Si I est NULL, aucune opération n'est effectuée." #. type: Plain text #: debian-trixie msgid "" "The B() function allocates memory for an array of I elements " "of I bytes each and returns a pointer to the allocated memory. The " "memory is set to zero. If I or I is 0, then B() " "returns a unique pointer value that can later be successfully passed to " "B()." msgstr "" "La fonction B() alloue de la mémoire pour un tableau de I " "éléments de I octets chacun et renvoie un pointeur sur la mémoire " "allouée. La zone mémoire est initialisée avec des B<0>. Si I ou " "I vaut B<0>, B() renvoie une valeur de pointeur unique qui " "pourra être passée ultérieurement à B() avec succès." #. type: Plain text #: debian-trixie msgid "" "If the multiplication of I and I would result in integer " "overflow, then B() returns an error. By contrast, an integer " "overflow would not be detected in the following call to B(), with " "the result that an incorrectly sized block of memory would be allocated:" msgstr "" "Si la multiplication de I par I provoque un dépassement " "d'entier, B() renvoie une erreur. Par contre, aucun dépassement " "d'entier ne serait détecté lors de l'appel suivant à B(), avec pour " "conséquence l'allocation d'un bloc de mémoire incorrectement dimensionné :" #. type: Plain text #: debian-trixie #, no-wrap msgid "malloc(nmemb * size);\n" msgstr "malloc(nmemb * taille);\n" #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "" "The B() function changes the size of the memory block pointed to " "by I to I bytes. The contents of the memory will be unchanged in " "the range from the start of the region up to the minimum of the old and new " "sizes. If the new size is larger than the old size, the added memory will " "I be initialized." msgstr "" "La fonction B() modifie la taille du bloc de mémoire pointé par " "I à I octets. Le contenu de la mémoire entre la zone de départ " "et le minimum des ancienne et nouvelle tailles n'est pas modifié. Si la " "nouvelle taille est plus grande que l'ancienne taille, le contenu de la zone " "de mémoire nouvellement allouée n'est I initialisé." #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "" "If I is NULL, then the call is equivalent to I, for all " "values of I." msgstr "" "Si I est égal à NULL, l'appel est équivalent à I pour " "toutes les valeurs de I." #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "" "If I is equal to zero, and I is not NULL, then the call is " "equivalent to I (but see \"Nonportable behavior\" for portability " "issues)." msgstr "" "Si I est égale à zéro et si I est différent de NULL, l'appel " "est équivalent à I (consulter cependant « Comportement non " "portable » pour les problèmes de portabilité)." #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "" "Unless I is NULL, it must have been returned by an earlier call to " "B or related functions. If the area pointed to was moved, a " "I is done." msgstr "" "Mis à part le cas où I est égal à NULL, il doit avoir été renvoyé par " "un appel précédent à B ou à une fonction de la même famille. Si la " "zone pointée a été déplacée, I est exécuté." #. type: Plain text #: debian-trixie msgid "" "The B() function changes the size of (and possibly moves) " "the memory block pointed to by I to be large enough for an array of " "I elements, each of which is I bytes. It is equivalent to the " "call" msgstr "" "La fonction B() déplace éventuellement le bloc mémoire pointé " "par I et change sa taille pour qu'il soit suffisamment grand pour " "contenir un tableau de I éléments faisant chacun I octets. " "Elle équivaut à l'appel" #. type: Plain text #: debian-trixie #, no-wrap msgid "realloc(ptr, nmemb * size);\n" msgstr "realloc(ptr, nmemb * taille);\n" #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "" "The B() and B() functions return NULL if I is " "not NULL and the requested size is zero; this is not considered an error. " "(See \"Nonportable behavior\" for portability issues.) Otherwise, the " "returned pointer may be the same as I if the allocation was not moved " "(e.g., there was room to expand the allocation in-place), or different from " "I if the allocation was moved to a new address. If these functions " "fail, the original block is left untouched; it is not freed or moved." msgstr "" "Les fonctions B() et B() renvoient NULL si I est " "différent de NULL et si la taille demandée est égale à zéro, ce qui n'est " "pas considéré comme une erreur (consulter « Comportement non portable » pour " "les problèmes de portabilité). Dans le cas contraire, le pointeur renvoyé " "peut être identique à I si la zone mémoire n'a pas été déplacée (par " "exemple s'il y a assez de place pour l'étendre à son emplacement), ou peut " "être différent de I si la zone mémoire a été déplacée à une nouvelle " "adresse. Si ces fonctions échouent, le bloc mémoire originel reste intact ; " "il n'est ni libéré ni déplacé." #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "C11, POSIX.1-2008." msgstr "C11, POSIX.1-2008." #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "None." msgstr "Aucun." #. type: Plain text #: debian-trixie #, no-wrap msgid "" "#include Eerr.hE\n" "#include Estddef.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\n" "\\&\n" "#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n" "#define MALLOC(type) MALLOCARRAY(1, type)\n" "\\&\n" "static inline void *my_mallocarray(size_t nmemb, size_t size);\n" "\\&\n" "int\n" "main(void)\n" "{\n" " char *p;\n" "\\&\n" " p = MALLOCARRAY(32, char);\n" " if (p == NULL)\n" " err(EXIT_FAILURE, \"malloc\");\n" "\\&\n" " strlcpy(p, \"foo\", 32);\n" " puts(p);\n" "}\n" "\\&\n" "static inline void *\n" "my_mallocarray(size_t nmemb, size_t size)\n" "{\n" " return reallocarray(NULL, nmemb, size);\n" "}\n" msgstr "" "#include Eerr.hE\n" "#include Estddef.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\n" "\\&\n" "#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))\n" "#define MALLOC(type) MALLOCARRAY(1, type)\n" "\\&\n" "static inline void *my_mallocarray(size_t nmemb, size_t taille);\n" "\\&\n" "int\n" "main(void)\n" "{\n" " char *p;\n" "\\&\n" " p = MALLOCARRAY(32, char);\n" " if (p == NULL)\n" " err(EXIT_FAILURE, \"malloc\");\n" "\\&\n" " strlcpy(p, \"foo\", 32);\n" " puts(p);\n" "}\n" "\\&\n" "static inline void *\n" "my_mallocarray(size_t nmemb, size_t taille)\n" "{\n" " return reallocarray(NULL, nmemb, taille);\n" "}\n" #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "" "For details of the GNU C library implementation, see E<.UR https://" "sourceware.org/glibc/wiki/MallocInternals> E<.UE .>" msgstr "" "Pour des détails sur l'implémentation de la bibliothèque GNU C, consulter " "E<.UR https://sourceware.org/glibc/wiki/MallocInternals> E<.UE .>" #. type: TH #: fedora-44 fedora-rawhide #, no-wrap msgid "2024-11-17" msgstr "17 novembre 2024" #. type: TH #: fedora-44 fedora-rawhide #, no-wrap msgid "Linux man-pages 6.13" msgstr "Pages du manuel de Linux 6.13" #. type: Plain text #: fedora-44 fedora-rawhide #, no-wrap msgid "" "BIB<);>\n" "BIB<);>\n" "BIB<, size_t >IB<);>\n" "BIB<, size_t >IB<);>\n" "BIB<, size_t >IB<, size_t >IB<);>\n" msgstr "" "BIB<);>\n" "BIB<);>\n" "BIB<, size_t >IB<);>\n" "BIB<, size_t >IB<);>\n" "BIB<, size_t >IB<, size_t >IB<);>\n" #. type: Plain text #: fedora-44 fedora-rawhide msgid "" "The B() function changes the size of (and possibly moves) " "the memory block pointed to by I to be large enough for an array of " "I elements, each of which is I bytes. It is equivalent to the call" msgstr "" "La fonction B() déplace éventuellement le bloc mémoire pointé " "par I et change sa taille pour qu'il soit suffisamment grand pour " "contenir un tableau de I éléments faisant chacun I octets. Elle " "équivaut à l'appel" #. type: Plain text #: fedora-44 fedora-rawhide #, no-wrap msgid "realloc(ptr, n * size);\n" msgstr "realloc(ptr, n * taille);\n" #. type: TH #: mageia-cauldron #, no-wrap msgid "Linux man-pages 6.17" msgstr "Pages du manuel de Linux 6.17" #. type: TH #: opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Linux man-pages (unreleased)" msgstr "Pages du manuel de Linux (non publiées)"