This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: RFC: class-related structures and conservative scanning


Tom Tromey wrote:
I'm not checking this in yet, I thought I'd get some comments first.

This patch changes the marking of Class objects so that only the
direct fields of Class are marked.  Then it updates all the
Class-related structures to be allocated with _Jv_AllocRawObj, so that
they will be conservatively scanned.

This fixes a number of memory leaks and is also useful infrastructure
for eventually enabling incremental collection.

This looks good to me. However, I think some of the fields - for efficiency and better precision - should be allocated with _Jv_AllocBytes and not _Jv_AllocRawObj:


"ioffsets", as it does not contain pointers.
"itable" and "ancestors", because they only ever contain pointers that are already guaranteed to be reachable via the other fields of the same class ("ifaces" and "superclass", respectively).


Also, For the interpreter static data, what we should really do is split this into separate pointer and non-pointer data blocks - thus getting precise scanning for free.

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]