Bug#361637: gcc-3.3: takes too much RAM when compiling const arrays
On Sun, Apr 09, 2006 at 11:52:27AM +0100, Silas S. Brown wrote:
> Package: gcc-3.3
> Version: 1:3.3.5-13
> Severity: minor
>
> I tried to compile flite (Festival Lite, the speech
> synthesizer) using gcc. One of the source files is a
> 7.5-megabyte C file with no includes and the only thing it
> contains is a single array of the form
>
> const char array[]={142,152,276,371,
> ... and so on for 7.5 megabytes (automatically generated)
>
> Why does gcc need well over 250 megabytes of RAM to compile
> this? My 128M system was not up to the task. I was later
> able to compile it without problems on a system with 1G of RAM.
>
> Automatically-generated arrays like this are reasonably
> common enough to warrant an effort to compile them more
> efficiently, especially for the benefit of people who don't
> have the latest hardware to compile on.
That is a known problem which was discussed on gcc lists
in late 2004 but actually dates back to 2000:
http://gcc.gnu.org/ml/gcc/2004-12/msg00126.html
It is in the bug database:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12245
but has not been solved despite the promises, although
there is a tentative (not actually finished) patch:
http://gcc.gnu.org/ml/gcc-patches/2005-10/msg00091.html
In other words, don't hold your breath. It seems that
most GCC developers think that 1GB is a ridiculously
small amount of memory these days :-(
Regards,
Gabriel
Reply to: