www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/11/01:39:06

Date: Tue, 11 Aug 1998 08:38:56 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Bruno Barberi Gnecco <brunobg AT geocities DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Trouble with many mallocs and reallocs
In-Reply-To: <35cf519a.8496651@news3.newscene.com>
Message-ID: <Pine.SUN.3.91.980811083830.6266C-100000@is>
MIME-Version: 1.0

On 10 Aug 1998, Bruno Barberi Gnecco wrote:

> p value was '\0', and I still can't see any special reason to it
> happen. I tried to type a line over 1kb in length, and it worked
> perfectly, but 20 lines of 3 characters didn't. The reallocation is
> OK. I debugged it step by step twice, and these particular times the
> trouble happened at the nn_p line, returning a SIGABRT, and in
> another point, also returning a SIGABRT.  I realy don't believe is
> lack of RAM, because I used less than 1kb in variables, and the .EXE
> is 195kb length (unoptimized and with debugging info).

Sorry, I don't understand any of this.  Which line crashes--the first
or the second?  What *exactly* is printed when it crashes?  Earlier
you said it crashes when reallocating, but the code snippet you posted
only calls `malloc', not `realloc'--which one is true?  And sos on,
and so on--the questions keep cropping.

I cannot even dream of helping you without a clear idea about the
problem.

Also, your program, at least in the fragment that you posted, doesn't
test the pointers returned by `malloc' for being NULL pointers, so you
could have all kinds of trouble using those pointers.

- Raw text -


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