Class unloading (Was: Heap fragmentation (Was: Debugging "Leaks" With Boehm-GC))
Boehm, Hans
hans.boehm@hp.com
Mon Jan 30 21:04:00 GMT 2006
> -----Original Message-----
> From: Tom Tromey
> >>>>> "Martin" == Martin Egholm Nielsen <martin@egholm-nielsen.dk>
> >>>>> writes:
>> [ class unloading ]
> Martin> Since it's in the JLS it may be standard GCJ behaviour?
>> We don't really implement this yet. It might work for
> interpreted classes, I'm not sure.
>> We haven't made this work for compiled classes yet. Ideally
> we would unmap shared libraries when all the classes from
> that .so have been collected.
>I suspect that's not currently safe. We would need to make sure that a
class can only be collected when none of its methods are running. I
think we currently have no way to tell whether that's the case, at least
for compiled methods, especially static ones. We would presumably have
to trace the thread stacks, and look for return addresses that point
into the .so. The GC certainly doesn't do that, and I don't think
anything else does either. (This would probably have to be checked with
the world stopped, so it would probably at least have to interact with
the GC.)
Hans
More information about the Java
mailing list