From: "Alexey Kouzmitch" Newsgroups: comp.os.msdos.djgpp Subject: Re: GCC uses A LOT of memory to parse static arrays Date: 19 Oct 1997 02:25:41 GMT Organization: All USENET -- http://www.Supernews.com Lines: 53 Sender: @209.6.120.242 Message-ID: <01bcdc35$dba78ea0$f27806d1@arexey.gis.net> References: <9710151405 DOT AA21437 AT axe DOT bre DOT da> NNTP-Posting-Host: 10066 AT 209 DOT 6 DOT 120 DOT 242 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I'd say the problem is that somehow the buffer is overflowed and not being flushed... I'm probably wrong tho... Alexey. J DOT Bischoff AT airbus DOT dasa DOT de wrote in article <9710151405 DOT AA21437 AT axe DOT bre DOT da>... > Hi! > > > Well the situation is the reverse! Using this code to generate the array: > > > > #include > > > > int main(int argc, char *argv[]) > > { > > int i; > > printf("unsigned char x[]={\n"); > > for (i=0; i<182520; i++) > > { > > printf("%d",i % 256); > > if (i!=182519) > > printf(","); > > if ((i % 20)==19) > > printf("\n"); > > } > > printf("};\n"); > > return 0; > > } > > > > I got "out of virtual"!!!!!, perhaps that isn't very important because you > > don't know what go32-v2 reports in my machine: > > > > DPMI memory available: 27435 Kb > > DPMI swap space available: 130389 Kb > > > > So 128Mb is not enough!! > > > This seems to be a general problem to all gcc-implementations (not only djgpp). > A example program that uses your 180000+-elements x[]-array created by > your example code above crashed on my Unix workstation (128 MB), > but with 256 MB it compiles well (gcc vers. 2.7.2.2). > > So I think this problem should be addressed to the developers of gcc. > > > Jens > -- >