harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Deakin <oliver.dea...@googlemail.com>
Subject Re: [General VM] GC strategy:how to garbage collect short-lived objects quickly.
Date Mon, 18 Sep 2006 13:57:54 GMT
Xiao-Feng Li wrote:
> On 9/14/06, Jimmy, Jing Lv <firepure@gmail.com> wrote:
>> Interesting topic, I'm still dreaming of "free()" in Java (This dream
>> begins at the very beginning when I see Java, as C/C++ is my first
>> program language )However, it seems RI will never give us "free()". :)
>>
>> Only a thought, Java may offer a key word "temp", indicating that this
>> variety can be freed at once.
>
>
> Well, it is not so easy to support "free()" in JVM as it looks like,
> and may not really bring benefit. Even worse, it may introduce unsafe
> code, which was one of the major design goals of Java/JVM. That said,
> I agree that some hints by programmer to assist GC might be an
> interesting topic.

There are always weak references to help out with short lived objects -
you know they will be collected fairly soon (should be within a few
gc cycles) - and soft references for longer lived ones. That's
about as close to free() as youll get for now!

Regards,
Oliver

> Thanks,
> xiaofeng
>
>> -- 
>>
>> Best Regards!
>>
>> Jimmy, Jing Lv
>> China Software Development Lab, IBM
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
>
> ---------------------------------------------------------------------
> 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
>
>

-- 
Oliver Deakin
IBM United Kingdom Limited


---------------------------------------------------------------------
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