harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xiao-Feng Li <xiaofeng...@gmail.com>
Subject Re: [drlvm][GarbageCollector] SoftReferences
Date Fri, 27 Mar 2009 00:15:49 GMT
2009/3/26 Carlos Torrão <carlos.torrao@gmail.com>:
> Hi,
> Salvador was focusing in the behavior of the GC in the presence of
> SoftReferences. For instance, if the objects are "deleted" if they don't
> have any Reference (strong one) during the GC swap through the objects. If
> this is true, maybe it's possible to do some kind of optimization to this
> behavior of the GC to SoftReferences. Do you know if there is something like
> that already developed for the DRLVM ?

Yes, DRLVM has Weak References implemented including weak/soft/phantom
references. Please check the source of DRLVM GC, and the source for
Weak References processing is under
<harmony>/working_vm/vm/gc_gen/src/finalizer_weakref/.  Feel free to
ask questions about it. Thanks.


> Best regards,
> Carlos Torrão
> 2009/3/26 Xiao-Feng Li <xiaofeng.li@gmail.com>
>> Hi, Salvador,
>> SoftReference is supported in DRLVM GC. I don't know what you mean for
>> "optimization in the SoftReference". Do you mean that, SoftReferences
>> are often used to implement object caching in a Java application? If
>> that is what you mean, it is not what GC cares, because it is an
>> optimization at application level, where SoftReferences are used as a
>> handy tool to keep some dead but may-be-useful-in-future objects.
>> In my understanding, those Weak Reference things are an utility
>> provided to Java programmer to manage their objects life cycle. Java
>> is supposed to manage all the objects automatically for the
>> programmer, but sometimes the programmer wants to have control over
>> their objects. It is a bit awkward, since Java should have been more
>> intelligent to do this kind of tasks automatically for the programmer
>> or with some hints from the programmer.
>> Thanks,
>> xiaofeng
>> On Thu, Mar 26, 2009 at 3:22 AM, Salvador Canelas
>> <salvador.canelas@ist.utl.pt> wrote:
>> > Greetings
>> >
>> > I'm interested in the DRLVM garbage collector features. I was reading the
>> > DRLVM development tasks and would like to know more about the task about
>> > implementing SoftReferences. Is this list updated and this features is
>> still
>> > missing or it has already been implemented? If it's already implemented I
>> > would like to know if there's any kind of optimization in the
>> SoftReferences
>> > and if caching is used in that optimization.
>> >
>> > Best Regards, Salvador Canelas
>> >
>> >
>> --
>> http://people.apache.org/~xli <http://people.apache.org/%7Exli>


View raw message