.\" -*- coding: UTF-8 -*- .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) .\" .\" %%%LICENSE_START(GPLv2+_DOC_FULL) .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, see .\" . .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH CFREE 3 "15 septembre 2017" "" "Manuel du programmeur Linux" .SH NOM cfree \- Libérer la mémoire allouée .SH SYNOPSIS .nf .PP \fB#include \fP .PP /* Avec SunOS 4 */ \fBint cfree(void *\fP\fIptr\fP\fB);\fP .PP /* Avec la glibc ou avec FreeBSD libcompat */ \fBvoid cfree(void *\fP\fIptr\fP\fB);\fP .PP /* Avec SCO OpenServer */ \fBvoid cfree(char *\fP\fIptr\fP\fB, unsigned \fP\fInum\fP\fB, unsigned \fP\fIsize\fP\fB);\fP .PP /* Dans Solaris watchmalloc.so.1 */ \fBvoid cfree(void *\fP\fIptr\fP\fB, size_t \fP\fInelem\fP\fB, size_t \fP\fIelsize\fP\fB);\fP .fi .PP .RS -4 Exigences de macros de test de fonctionnalités pour la glibc (consulter \fBfeature_test_macros\fP(7))\ : .RE .PP \fBcfree\fP()\ : Depuis la glibc 2.19\ : _DEFAULT_SOURCE Glibc 2.19 et antérieures\ : _BSD_SOURCE || _SVID_SOURCE .SH DESCRIPTION Cette fonction ne devrait jamais être utilisée. Utilisez \fBfree\fP(3) à la place. À partir de la version 2.26, elle a été supprimée de la glibc. .SS "cfree avec un argument" Dans la glibc, la fonction \fBcfree\fP() est un synonyme de \fBfree\fP(3), «\ ajoutée pour être compatible avec SunOS\ ». .PP D'autres systèmes ont d'autres fonctions du même nom. La déclaration se trouve parfois dans \fI\fP et parfois dans \fI\fP. .SS "cfree avec trois arguments" Certaines versions de SCO et de Solaris ont des bibliothèques malloc avec une fonction \fBcfree\fP() à 3 arguments, apparemment par analogie à \fBcalloc\fP(3). .PP Si vous en avez besoin et que vous faites un portage, ajoutez .PP .in +4n .EX #define cfree(p, n, s) free((p)) .EE .in .PP dans votre fichier. .PP Une question fréquemment posée est\ : «\ Puis\-je utiliser \fBfree\fP(3) pour libérer de la mémoire allouée avec \fBcalloc\fP(3), ou bien dois\-je utiliser \fBcfree\fP()\ ?\ ». La réponse est\ : utilisez \fBfree\fP(3). .PP Un manuel de SCO dit\ : «\ La routine cfree est fournie pour être conforme à la norme iBCSe2 et faciliter les appels de free. Les arguments num et size de cfree ne sont pas utilisés.\ » .SH "VALEUR RENVOYÉE" La version SunOS de \fBcfree\fP() (qui est un synonyme de \fBfree\fP(3)) renvoie 1 si elle réussit et 0 si elle échoue. En cas d'erreur, \fIerrno\fP est positionnée à \fBEINVAL\fP\ : la valeur de \fIptr\fP n'était pas un pointeur vers un bloc précédemment alloué par l'une des routines de la famille \fBmalloc\fP(3). .SH VERSIONS .\" commit 025b33ae84bb8f15b2748a1d8605dca453fce112 La fonction \fBcfree\fP() a été supprimée de la glibc dans la version 2.26. .SH ATTRIBUTS Pour une explication des termes utilisés dans cette section, consulter \fBattributes\fP(7). .TS allbox; lb lb lb l l l. Interface Attribut Valeur T{ \fBcfree\fP() T} Sécurité des threads MT\-Safe /* Dans la glibc */ .TE .SH CONFORMITÉ La version à trois arguments de \fBcfree\fP() est utilisée par SCO pour être conforme à la norme iBCSe2\ : «\ Intel386 Binary Compatibility Specification, Edition 2\ ». .SH "VOIR AUSSI" \fBmalloc\fP(3) .SH COLOPHON Cette page fait partie de la publication\ 5.10 du projet \fIman\-pages\fP Linux. Une description du projet et des instructions pour signaler des anomalies et la dernière version de cette page peuvent être trouvées à l'adresse \%https://www.kernel.org/doc/man\-pages/. .PP .SH TRADUCTION La traduction française de cette page de manuel a été créée par Christophe Blaess , Stéphan Rafin , Thierry Vignaud , François Micaux, Alain Portal , Jean-Philippe Guérard , Jean-Luc Coulon (f5ibh) , Julien Cristau , Thomas Huriaux , Nicolas François , Florentin Duneau , Simon Paillard , Denis Barbier , David Prévot et Jean-Pierre Giraud . .PP Cette traduction est une documentation libre ; veuillez vous reporter à la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License version 3 .UE concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE. .PP Si vous découvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un message à .MT debian-l10n-french@lists.debian.org .ME .