From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2823 invoked by alias); 8 Jan 2005 15:27:06 -0000 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org Received: (qmail 2807 invoked by uid 48); 8 Jan 2005 15:27:06 -0000 Date: Sat, 08 Jan 2005 15:27:00 -0000 From: "mark at gcc dot gnu dot org" To: java-prs@gcc.gnu.org Message-ID: <20050108152704.19325.mark@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug java/19325] New: Invoking gcj -C on a list of source files consumes insane amount of memory X-Bugzilla-Reason: CC X-SW-Source: 2005-q1/txt/msg00041.txt.bz2 List-Id: 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