harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robin Garner <robin.gar...@anu.edu.au>
Subject Re: [General VM] GC strategy:how to garbage collect short-lived objects quickly.
Date Tue, 19 Sep 2006 07:31:24 GMT
Egor Pasko wrote:
> On the 0x1E4 day of Apache Harmony Oliver Deakin wrote:
>>> Forcing gc by hand does work, but it is difficult for code to know
>>> when to
>>> call gc.So I think it is better if VM can give some support since it
>>> knows
>>> the global situation.:)
>> ..and of course a manual gc() call does not necessarily result in a gc
> 
> this one is easy :) make a gc2() magic in DRLVM and collect only young
> objects on it.. to make code portable, implement gc2() as gc() for
> other JVMs. Need to be patient until the generational GC.
> 
> Can a hack like this be widely accepted in Java community? I think, yes.
> 

I think GC research will soon make this unnecessary.  For example the 
Sun VM has a concurrent collector for its mature space, so on a 
sufficiently lightly loaded system (or with a core to spare) you could 
eliminate most of the mature space collection pause time.

In MMTk, there is a command line switch, -X:gc:fullHeapSystemGc, used to 
specify whether System.gc() causes a full heap collection.  But no, I 
don't think this is something users should need to play with.

cheers

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message