Date: Thu, 9 Oct 1997 15:19:18 +0200 (MET DST) From: Herman Geza To: Eli Zaretskii cc: "Salvador Eduardo Tropea (SET)" , djgpp AT delorie DOT com Subject: Re: Compiler crashes... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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