harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Volosyuk" <ivan.volos...@gmail.com>
Subject Re: [drlvm] Class unloading support
Date Sun, 29 Oct 2006 17:23:16 GMT
If I understand you correctly, you suggest to increment
per-classloader object counter on allocation... It can be much
overhead with the solution, as most of the objects die young.
Do I miss something?
--
Ivan

On 10/29/06, Etienne Gagnon <egagnon@sablevm.org> wrote:
> I have missed some messages of this thread, yet I do not remember seeing
> a discussion of what seems to me the obvious solution to the problem.
> So, here it is.
>
> Why don't you simply add a reference count on classes which is
> incremented on object allocation and decremented on object reclamation?
>  [In case you use a copying collector, you could keep a separate count
> (in the class) for the collected area, so that you only have to count
> copied objects].  You would also use reference counting for the class
> loader (therefore eliminating any cyclic problem that you could have
> with normal garbage collection).  This would work very well as unloading
> only happens when the class loader can be unloaded along all of its classes.
>
> No need for any supportive information in object header, or anything
> complex...  Am I really missing something?
>
> Just an idea...
>
> Etienne
>
>
> --
> Etienne M. Gagnon, Ph.D.            http://www.info2.uqam.ca/~egagnon/
> SableVM:                                       http://www.sablevm.org/
> SableCC:                                       http://www.sablecc.org/

Mime
View raw message