Date: Tue, 11 Aug 1998 08:38:56 +0300 (IDT) From: Eli Zaretskii To: Bruno Barberi Gnecco cc: djgpp AT delorie DOT com Subject: Re: Trouble with many mallocs and reallocs In-Reply-To: <35cf519a.8496651@news3.newscene.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.