This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: Unloading classes
- From: "Boehm, Hans" <hans_boehm at hp dot com>
- To: "'Jeff Sturm'" <jsturm at one-point dot com>, Anthony Green <green at redhat dot com>
- Cc: "Boehm, Hans" <hans_boehm at hp dot com>, "'java at gcc dot gnu dot org'" <java at gcc dot gnu dot org>
- Date: Mon, 4 Nov 2002 12:53:24 -0800
- Subject: RE: Unloading classes
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
>