Patch: Add new _Jv_SetGCFreeSpaceDivisor method to libgcj.

David Daney ddaney@avtrex.com
Mon Oct 22 17:13:00 GMT 2007


Andrew Haley wrote:
> David Daney writes:
>  > As I mentioned previously, GC_free_space_divisor is no longer exported 
>  > from libgcj.so.
>  > 
>  > Access to this GC tuning parameter is needed on systems where the 
>  > maximum heap size is set.  If GC_free_space_divisor is not set to a 
>  > value larger than its default value of three, the heap can easily get 
>  > fragmented in such a manner that OutOfMemoryErrors are thrown even 
>  > though there is plenty of free memory.
>  > 
>  > Since the loss of the ability to adjust GC_free_space_divisor is a 
>  > regression, this should be committed even though we are in stage three.
>  > 
>  > Tested on x86_64-pc-linux-gnu in libjava with no regressions.
>  > 
>  > OK to commit?
>  > 
>  > 2007-10-20  David Daney  <ddaney@avtrex.com>
>  > 
>  >     * include/jvm.h (_Jv_SetGCFreeSpaceDivisor): Declare new function.
>  >     * boehm.cc (_Jv_SetGCFreeSpaceDivisor): Define it.
> 
> Sure.
> 
> Incidentally, my ceasing to export GC_* wasn't a particularly well
> thought-out decision: I just looked at the symbols we were exporting
> and decided on a subset I thought was useful.  Maybe there are some
> GC_ symbols that should be exported.  Thoughts?

I think it is fine.

After adding _Jv_SetGCFreeSpaceDivisor, and with the things in the new 
gnu.gcj.util.GCInfo class I think it is all covered.


David Daney



More information about the Java-patches mailing list