Unloading classes
Boehm, Hans
hans_boehm@hp.com
Mon Nov 4 12:53:00 GMT 2002
I agree. But even in the interpreted case, the argument seems to be very slightly dubious, in that I think we have to assume the "this" pointer in _Jv_InterpMethod::run will be seen as reachable by the collector even when it will no longer be dereferenced. Effectively, we are assuming that the compiler won't perform some really heroic optimizations, which would result in the register for the "this" pointer getting prematurely reused.
(I'm assuming that the interpreter itself can access the "prepared" instructions after its last reference to the class object. I believe this is true, but I wouldn't bet large sums of money on it.)
Hans
> -----Original Message-----
> From: Jeff Sturm [mailto:jsturm@one-point.com]
> Sent: Sunday, November 03, 2002 7:28 PM
> To: Anthony Green
> Cc: java@gcc.gnu.org
> Subject: Re: Unloading classes
>>> On 3 Nov 2002, Anthony Green wrote:
> > > I think you need to guarantee no static method of the
> class is executing
> > > when you dlclose(). This is hard with the current GC.
> >
> > Hmm... I don't really follow this. How could a class being
> finalized
> > have any methods executing?
>> Never mind. I was thinking about compiled classes, which is a harder
> problem.
>> Jeff
>
More information about the Java
mailing list