harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Etienne Gagnon <egag...@sablevm.org>
Subject Re: [drlvm] Class unloading support
Date Sun, 29 Oct 2006 14:40:46 GMT
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