From: J DOT Bischoff AT airbus DOT dasa DOT de Message-Id: <9710151405.AA21437@axe.bre.da> Subject: Re: GCC uses A LOT of memory to parse static arrays To: salvador AT inti DOT edu DOT ar (Salvador Eduardo Tropea) Date: Wed, 15 Oct 1997 16:05:25 METDST Cc: djgpp AT delorie DOT com In-Reply-To: ; from "Salvador Eduardo Tropea" at Oct 14, 97 3:40 pm Precedence: bulk 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 --