This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: GC Problems...
- From: "Boehm, Hans" <hans dot boehm at hp dot com>
- To: "'Simon Levitt'" <simon dot levitt at worldpay dot com>, java at gcc dot gnu dot org
- Date: Tue, 7 Sep 2004 10:01:28 -0700
- Subject: RE: GC Problems...
I'm not sure whether there might be a leak in the JvAttachCurrentThread
code, particularly since I have no experience with your platform.
In general, I suspect that without the explicit limit, this should stabilize at
a heap size much larger than 768K. The collector will try to amortize the cost
of scanning the root set, which currently includes essentially all static
data in the process, and tends to be much bigger.
Are you saying that the 768K limit is ignored, and it grows beyond that?
If so, it would be good to put a breakpoint in GC_expand_hp_inner and see
how and why it's getting to the heap expansion code.
It might also be interesting to call GC_dump() after it has run for a while,
and see what that looks like. I'd pay particularly close attention to the
root set.
Hans
> -----Original Message-----
> From: java-owner@gcc.gnu.org
> [mailto:java-owner@gcc.gnu.org]On Behalf Of
> Simon Levitt
> Sent: Monday, September 06, 2004 9:58 AM
> To: java@gcc.gnu.org
> Subject: GC Problems...
>
>
> Hi,
> I've tried without much success to find any similar problems
> to this in the
> list archives.
> Recently I've been invovled in a project to use GCJ as a
> backend for an
> implementation for a COM object.
> The primary development environment is under MinGW/MSYS
> (Using the latest
> stable versions + newest binutils) on Win2000.
> We've been having a number of problems with the garbage
> collection, most of
> which have been resolved by compiling a recent version
> (version: 3.5.0
> 20040824 experimental) of GCC with USE_GLOBAL_ALLOC defined.
> (The used
> gc_config.h file is attached). I'm only compiling the static
> libraries.
> The problem exists in both the COM environment we're running
> under, and the
> simple test case application I'm attaching here, there
> appears to be a memory
> leak.
>
> Also, unless I explicity call GC (Code in Helper.java),
> hardly any attempts to
> garbage collect are made at all - and the memory usage increases
> singificantly quicker.
> Regardless of whether I create a single or multiple string objects
> (GCTester.java) the memory usage still increases.
> Even removing the System.err and System::err calls the memory
> usage (as
> reported in gc.log) still steadily increases.
> If the attached CPP and Java is compiled into an application
> using the
> following:
> gcj -C Helper.java
> gcj -c Helper.java
> gcjh Helper -classpath .
> g++ -o GCTester GCTester.cpp Helper.o -lgcj -ws2_32
> Can anyone shed any light on this?
> Thanks, in advance,
> Simon.,
> --
> --------------------------------------------------------------
> ------------
> Simon Levitt, Principal Development Engineer @ WorldPay,
> WorldPay Centre, The Science Park, Milton Rd., Cambridge, CB4
> 0WE, ENGLAND
> Simon.Levitt@worldpay.com Ph:+44(0)1223 715151
> F:+44(0)1223 715157
> ------------------------- http://www.worldpay.com/
> -----------------------
>