delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/01/06:37:39

Date: Sun, 1 Mar 1998 13:35:54 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Bill Bouma <bouma AT geoplex DOT com>
cc: "'A. Sinan Unur'" <sinan DOT unur AT cornell DOT edu>, djgpp AT delorie DOT com
Subject: RE: gcc running out of memory?
In-Reply-To: <55EB3EEB118ED111BD32080009EFAA08011945@exchsj02.geoplex.com>
Message-ID: <Pine.SUN.3.91.980301132645.13547N-100000@is>
MIME-Version: 1.0

On Sun, 1 Mar 1998, Bill Bouma wrote:

> > now, those were general recommendations. it sounds more like you are
> > running out of stack space. once you make sure enough memory is
> > available, you can use stubedit to increase the default stack size for
> > gcc (just go to the bin directory, type stubedit gcc.exe, and set it
> > to
> > 1Mb or more, and give it a shot.)
> > 
> 	Thank you for your help.  Unfortunately I have tried both of your
> 	suggestions but I am still getting the "illegal instruction" error.  I
> 	set the stack size of gcc at 8MB.  According to stubedit, that value
> 	is a minimum, so the stack size probably should grow automatically
> 	as needed?

No, the stack is allocated at startup in its entirety, and doesn't grow 
as needed (that's why you were advised to enlarge it).

Forgive me for asking, but are you sure you indeed enlarged both DPMI 
memory of your DOS box and the stack size?  What does go32-v2.exe print 
in the same DOS box when invoked with no arguments?  If the two numbers 
it prints don't add to 64MB, you need to look for a reason (maybe your 
disk doesn't have enough free swap space?).

If go32-v2 *does* report 64MB, then GCC should report at least that much 
with -dm option, before it crashes, or else the problem is not related to 
memory shortage.

If nothing helps, please run GCC again with memory-reporting option, and 
also add -Q to the GCC command line.  This will cause it to print names 
of functions as it compiles them, and you will have a better idea where 
does it crash.

If the program is in C++, one possibility is that you might be using 
exceptions or some other feature which is buggy in the C++ compiler, and 
it crashes due to this bug.  Turning off optimizations might help in 
these cases, but the best solution is to not use these features, for now.

- Raw text -


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