This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug java/19325] New: Invoking gcj -C on a list of source files consumes insane amount of memory
- From: "mark at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 8 Jan 2005 15:27:06 -0000
- Subject: [Bug java/19325] New: Invoking gcj -C on a list of source files consumes insane amount of memory
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When invoking gcj -C on a list of source files (either on the command line or
with @file) jc1 consumes a lot of memory.
Example. Go into the libjava directory in gcc and do:
gcj -Wno-deprecated -C -d /tmp $(find javax -name *.java)
This will consume more than 200MB of memory.
We use gcj -C @classes where classes are all the classes in GNU Classpath and
this easily consumes more than 500MB. We work around this by splitting the
@classes file in smaller groups. This didn't work anymore for the new locale
support we added which consists of about 250 generated source files. We had to
rewrite the source file generator to get the memory use of gcj down enough to be
able to compile on machines with 500MB or less. (The rewrite consisted of
pushing most data into String constants and only at runtime parse and extract
those instead of writing out the whole datastructure generation in code.)
It looks like the byte code and trees generated for methods isn't released after
writing out the .class file.
--
Summary: Invoking gcj -C on a list of source files consumes
insane amount of memory
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mark at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19325