GC Problems...
Simon Levitt
simon.levitt@worldpay.com
Mon Sep 6 16:58:00 GMT 2004
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/ -----------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GCTester.cpp
Type: text/x-c++src
Size: 792 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java/attachments/20040906/14ce845f/attachment.bin>
More information about the Java
mailing list