delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/15/10:10:54

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: <m0xL61M-000S1mC@inti.gov.ar>; from "Salvador Eduardo Tropea" at Oct 14, 97 3:40 pm

Hi!

> Well the situation is the reverse! Using this code to generate the array:
> 
> #include <stdio.h>
> 
> 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
--

- Raw text -


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