This is the mail archive of the
mailing list for the GCC project.
High memory consumption compiling syntax.c
- To: gcc at gcc dot gnu dot org
- Subject: High memory consumption compiling syntax.c
- From: "Eli Zaretskii" <eliz at is dot elta dot co dot il>
- Date: Mon, 01 Oct 2001 09:27:45 +0200
- Reply-to: Eli Zaretskii <eliz at is dot elta dot co dot il>
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 126.96.36.199.
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.)
(Please cc me on your replies, since I don't read this list. Thanks.)