www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/12/16:42:22

From: Mark Elliott <elliott AT uni-leipzig DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: upgrade chaos
Date: Wed, 12 Jan 2000 20:36:39 +0100
Organization: Uni Leipzig
Lines: 36
Message-ID: <387CD7C7.2EF2D4D8@uni-leipzig.de>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000112085053 DOT 28074F AT is> <387C4C68 DOT 2B736BA4 AT uni-leipzig DOT de>
NNTP-Posting-Host: pmi18.isdn.uni-leipzig.de
Mime-Version: 1.0
X-Trace: news.uni-leipzig.de 947705983 2615 139.18.110.83 (12 Jan 2000 19:39:43 GMT)
X-Complaints-To: usenet AT news DOT uni-leipzig DOT de
NNTP-Posting-Date: 12 Jan 2000 19:39:43 GMT
X-Mailer: Mozilla 4.7 [en] (Win95; I)
X-Accept-Language: en,sr,de-DE
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com


> To clarify, I upgraded from v2.01, and am using code originally written for Borland
> C, in which it is sometimes necessary to free some more memory than was originally
> allocated (i.e. free(var+4);). Given that I kept this style, the explanation above
> probably accounts for my problems, thanks a lot for pointing this out ( - in
> advance, I haven't tested my code without the modification yet).

free(var) continues to crash when memory was not originally allocated by malloc, -
memset seems to work as an alternative. with respect to free(var+4); as I understood
it, this was a necessity in Borland because you could never guaruntee deallocating as
much as you had allocated.

Anyhow, thanks for the crosspostings on this, my problem has been resolved.

Mark

--
-----------------------------------

Mark A. Elliott

Universität Leipzig.
Institut für Allgemeine Psychologie.
Seeburgstr. 14/20,
D-04103 Leipzig.
Germany

Tel: ++49 (0)341 97 359 57
Fax: ++49 (0)341 97 359 69

email: elliott AT uni-leipzig DOT de

-----------------------------------


- Raw text -


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