🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fr.comp.lang.c
Article #15332

Re: Tableau: différence entre pile et tas

#15332
From: Antoine Leca
Date: Thu, 29 Sep 2005 10:09
20 lines
2206 bytes
En <news:1127978086.261193.54490@g14g2000cwa.googlegroups.com>,
David va escriure:
> C'est peut-�tre une mauvaise habitude, mais je ne teste habituellement
> pas la valeur de retour de malloc.

Dans ce cas, ne demandes pas pourquoi tu as SIGSEGV.

> Par contre, dans ce cas, cela me parait appropri� parce que je
> demande une grosse quantit� de m�moire.

C'est surtout adapt� parce que tu fais trois demandes d'allocation, donc si
tu obtiens un SIGSEGV (qui peut �tre d� � un manque de cour _ou_ � une
erreur de programmation), tester chacune va te permettre de savoir (avant)
_quelle_ est celle qui a foir�e, alors que le signal te dis seulement � trop
court, mon fils � (xmalloc, c'est-�-dire la m�thode gros bourin qui avorte
le programme quand malloc ne r�ussit pas, donne le m�me r�sultat que le
signal).


Antoine
Technical Details
Message-ID: <dhgegh$gj$1@shakotay.alphanet.ch>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!feeder.ecngs.de!ecngs!feeder2.ecngs.de!fr.ip.ndsoftware.net!proxad.net!freenix!news.alphanet.ch!alphanet.ch!not-for-mail
References: <1127923112.347881.79740@z14g2000cwz.googlegroups.com> <mn.e49a7d59f0935c1a.31483@laposte.net> <1127978086.261193.54490@g14g2000cwa.googlegroups.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f9822,9ee84542aed426f5
X-Google-Attributes: gidf9822,public
X-Google-Language: FRENCH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!feeder.ecngs.de!ecngs!feeder2.ecngs.de!fr.ip.ndsoftware.net!proxad.net!freenix!news.alphanet.ch!alphanet.ch!not-for-mail
From: "Antoine Leca" <root@localhost.invalid>
Newsgroups: fr.comp.lang.c
Subject: Re: Tableau: différence entre pile et tas
Date: Thu, 29 Sep 2005 12:09:20 +0200
Organization: Posted through ALPHANET (http://www.alphanet.ch/)
Lines: 21
Sender: antoinel@143.red-217-127-250.staticip.rima-tde.net
Message-ID: <dhgegh$gj$1@shakotay.alphanet.ch>
References: <1127923112.347881.79740@z14g2000cwz.googlegroups.com>   <mn.e49a7d59f0935c1a.31483@laposte.net> <1127978086.261193.54490@g14g2000cwa.googlegroups.com>
NNTP-Posting-Host: 143.red-217-127-250.staticip.rima-tde.net
Mime-Version: 1.0
Content-Type: text/plain;
 charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: shakotay.alphanet.ch 1127988562 531 217.127.250.143 (29 Sep 2005 10:09:22 GMT)
X-Complaints-To: usenet@alphanet.ch
NNTP-Posting-Date: Thu, 29 Sep 2005 10:09:22 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506