GC incremental
minyard@acm.org
minyard@acm.org
Mon Oct 1 15:34:00 GMT 2001
"Boehm, Hans" <hans_boehm@hp.com> writes:
> > From: minyard@acm.org [ mailto:minyard@acm.org ]
> >
> > Jeff Sturm <jsturm@one-point.com> writes:
> >
> > > True. But the static vtable of a primitive array can be ignored for
> > > marking purposes. From prim.cc:
> > >
> > > # ifdef JV_HASH_SYNCHRONIZATION
> > > // Since the vtable is always statically allocated,
> > > // these are completely pointerfree! Make sure the GC
> > doesn't touch them.
> > > __JArray *arr =
> > > (__JArray*) _Jv_AllocPtrFreeObj (size + elsize * count, klass);
> > > memset((char *)arr + size, 0, elsize * count);
> > > # else
> >
> > The vtable can't be ignored in the long run if classes are ever
> > unloaded dynamically, and the sync pointer can't be ignored (unless it
> > has been moved out of the object, which I think there was some
> > discussion of, but I haven't checked the new sources).
> Why would you dynamically allocate the vtable for a primitive array, e.g. an
> array of int?
Okay, I wasn't thinking here :-).
-Corey
More information about the Java
mailing list