This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

High memory consumption compiling syntax.c


Compiling the file src/syntax.c from the Emacs distribution causes GCC
to devour lots of memory.  Using the DJGPP port, I see something like
14MB of memory allocated by cc1 while compiling that file.

This is not something new with the latest versions of GCC: I remember
similar results with GCC 2.7.2.1.

Lately, a user reported that on a Sparc, GCC aborted during the
compilation of syntax.c because VM was exhausted.  This means that
some users might have trouble building Emacs due to this.

So I would like to modify syntax.c to reduce the memory required by
GCC, but without losing too much of the code efficiency (routines from
syntax.c are quite heavily used in code whose speed is important).

Unfortunately, I don't know enough about GCC internals to see what
part(s) of syntax.c are the ones which cause such a high consumption
of memory.  Could someone in the know please take a look at syntax.c
and suggest which parts should I try to rewrite and in what way?

Another possibility could be to use specific compiler options to
reduce memory consumption.  (Currently, syntax.c is compiled with -O
or -O2, depending on the platform.)

TIA

(Please cc me on your replies, since I don't read this list.  Thanks.)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]