This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Question on GCJ/Boehm Memory Utilization, Part II
I believe the correct word for what is happening is "fragmentation".
Hans also calls it "unexpectedly large heap growth". Maybe this latter
term is the most appropriate. What is happening is pretty clear:
Not being an expert on GC, I believe it would help if you increase the
"GC_free_space_divisor" as I (thankfully) has been instructed to do, as
well.
See the thread:
http://gcc.gnu.org/ml/java/2006-01/msg00135.html
In short, instead of doing:
# gcj -o something --main=some.package.MainClass *.o
when linking, do something like:
# gcj -save-temps -o something --main=some.package.MainClass *.o
# patch<gc-setup.patch
# gcc -x c some.package.MainClassmain.i -c
# gcj -o something *.o
where "gc-setup.patch" is something like:
--- 8< 8< 8< ---
--- some.package.MainClassmain.ori 2006-02-07 15:48:24.831138400 +0100
+++ some.package.MainClassmain.i 2006-02-07 15:13:47.116111200 +0100
@@ -9,5 +9,6 @@
int main (int argc, const char **argv)
{
_Jv_Compiler_Properties = props;
+ GC_set_free_space_divisor(10);
JvRunMain (&_ZN4some7package9MainClass6class$E, argc, argv);
}
--- 8< 8< 8< ---
It's so easy to test - let's hear if it works... It did for me!
// Martin