delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/09/09:29:36

Date: Thu, 9 Oct 1997 15:19:18 +0200 (MET DST)
From: Herman Geza <hg211 AT hszk DOT bme DOT hu>
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
cc: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT edu DOT ar>, djgpp AT delorie DOT com
Subject: Re: Compiler crashes...
In-Reply-To: <Pine.SUN.3.91.971009115004.1612D-100000@is>
Message-ID: <Pine.GSO.3.96.971009150831.28093A-100000@ural2>
MIME-Version: 1.0


On Thu, 9 Oct 1997, Eli Zaretskii wrote:

> 
> On Wed, 8 Oct 1997, Salvador Eduardo Tropea (SET) wrote:
> 
> > Bad news:
> > GCC doesn't support big arrays with initialization, like this:
> > 
> > char XXX[100000]={ 1,2,....
> > ...
> > ... 99999 };
> > 
> > The compiler will crash or if you have luck (like I have) it will
> > report out of virtual memory. Seems that gcc uses MUCH more memory
> > for this that what we can think. For example: 300000 elements needs
> > more than 40Mb.
> 
> Are you sure?  Can you post a short program that shows this problem?
> 
> Testing with a program that I used (see below) indicates that it takes
> cc1 about 10MB to compile it.  But I never had any crashes or "out of
> memory" messages.

Here was the program.

	So, I'm here again. I said that there is no problem with
	arrays with 100.000 elements. I said the problem begins
	from about 200.000 - 300.000 elements. If your compiler
	doesn't crash with this value, try 500.000. If it still
	doesn't crash, please tell me your configuration settings.
	I haven't "out of memory", I do have SIGSEGV! And I must
	link my array into my program, the appending to the exe file
	is not good. Or have you got some program like Borland's
	binobj? I'd glad if you had. On the other hand, I solved
	the problem temporarily. I made a bin2s converter which
	make asm file not c-file, but it solution isn't portable,
	I must make it to be portable. So please, help me.

					Lantic

- Raw text -


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