cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/21/15:44:31

From: "Damian Yerrick" <NOSP AT Msnews@pineight.8m.com>
Newsgroups: comp.os.msdos.djgpp
References: <Pine DOT SUN DOT 3 DOT 91 DOT 991209160149 DOT 22560D-100000 AT is> <82rh3j$sfu AT cantine DOT wu-wien DOT ac DOT at> <385EC088 DOT 8403BF22 AT ibm DOT net>
Subject: Re: Problems with MALLOC and FREE
Lines: 29
Organization: Pin Eight Software <http://pineight.8m.com/>
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Message-ID: <7GM74.500$PK3.5161@dfiatx1-snr1.gtei.net>
X-Trace: /KDWjc+dNvj7YTbnb+5OCTUVU0exY+rhDqClpGjTmp1FWlxOxY6Q4OKVvxxsZewJf5ZVjQV9dVC2!WndHC+ZHcEdXw2R29C7bSjskvL3EF1gw091SZ/qIxycxrKawFFRs9MU2rvvx9TIiqw==
X-Complaints-To: abuse AT gte DOT net
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
NNTP-Posting-Date: Tue, 21 Dec 1999 15:04:35 GMT
Distribution: world
Date: Tue, 21 Dec 1999 15:04:35 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"yhirsch" <yhirsch AT ibm DOT net> wrote:
> The first part doesn't cause any problem naturally, but you
> have to check if you free parts of that array during the
> program BEFORE shutdown! That's very important,
> because if you do and don't set those parts back to NULL,
> it means that at shutdown, you're trying to free areas in
> memory that have already been freed - which causes a
> SIGSEGV error. So remember, if, at some point, you
> free memory - set the pointer to NULL.

Oh, by the way, does anyone know what the standard
says should happen when you free(NULL)?

--
Damian Yerrick    http://yerricde.tripod.com/
View full .sig:  http://www.rose-hulman.edu/~yerricde/sig.html










and now you must pay...


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019