GC behaviour of gcj programs
Robin Garner
robin.garner@iname.com
Fri Nov 7 07:25:00 GMT 2003
I'm trying to look into the performance of gcj programs under varying heap sizes, and I'm wondering if it's possible to persuade the collector to run with a fixed sized heap.
My first attempt was to do
GC_set_max_heap_size(bytes);
GC_use_entire_heap = 1;
but it seems that the heap won't grow beyond the threshold set by GC_free_space_divisor. If I set GC_free_space_divisor to 1, then the program falls over when it reaches the heap size. Setting the heap size and adjusting the heap divisor works just fine, it's just that the behaviour in a fixed size heap doesn't match expectations.
I've tried replacing GC_oom_fn with one that forces a collection, then GC_mallocs, but this doesn't seem to work the way I expect.
I'm doing this via CNI calls through to the Boehm GC's API. If the free_space_divisor was a float I would also be happy(ish), but for me the most interesting values of it are between 1 and 2, and 2 and 3.
Any assistance appreciated. Gcc 3.3.
-- Robin
--
__________________________________________________________
Sign-up for your own personalized E-mail at Mail.com
http://www.mail.com/?sr=signup
Search Smarter - get the new eXact Search Bar for free!
http://www.exactsearchbar.com/
More information about the Java
mailing list