harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Ignatenko" <aleksey.ignate...@gmail.com>
Subject Re: [drlvm] Class unloading support
Date Mon, 30 Oct 2006 07:46:34 GMT
>Hmmm...  Yes, some more details would be nice.
>If I get it right, in case of automagic unloading, GC does all the job
>without a knowledge whether it collects a class, a classloader or
>whatever else.
>Perhaps I'm missing something, but to provide a callback on class
>unloading, the GC must know the semantic of the object being collected.?

Alex.
GC does not need any special knowledge about the semantic of the object
being collected. We simply provide weak root to j.l.Classloader inside VM.
When VM detects that this weak reference is zeroed (e.g. at the end of GC
cycle) it destroys all native sources of appropriate classloader or schedule
this destroy on some other time.

I hope, I answered your question.
Aleksey.


On 10/29/06, Alex Astapchuk <alex.astapchuk@gmail.com> wrote:
>
> Mikhail Fursov:
> > On 10/28/06, Alex Astapchuk <alex.astapchuk@gmail.com> wrote:
> >>
> >> Aleksey,
> >>
> >> >   1. Mark and scan based approach.
> >> >   2. Automatic class unloading approach.
> >>
> >> In the #2, is there any chance for other components to be notified
> about
> >>    unloaded classes?
> >>
> >
> > Alex,
> > I asked Aleksey about the same feature some time ago. I was interested
> if
> > it's possible to deallocate profiler's data in EM for unloaded methods.
> The
> > answer was: OK you will get a callback from VM. So, this feature is in
> the
> > design. Let's wait Aleksey to give us more details about it.
>
> Hmmm...  Yes, some more details would be nice.
> If I get it right, in case of automagic unloading, GC does all the job
> without a knowledge whether it collects a class, a classloader or
> whatever else.
> Perhaps I'm missing something, but to provide a callback on class
> unloading, the GC must know the semantic of the object being collected.
>
> ?
>
> --
> Thanks,
>   Alex
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message