Questions about GC, _Jv_MarkObj() and reflection data.

Boehm, Hans hans.boehm@hp.com
Tue Feb 7 19:42:00 GMT 2006


> From:  Andrew Haley
> Tom Tromey writes:
>  > 
>  > It occurred to me that you could also implement this by 
> having boehm.c  > generate a length descriptor even if the 
> object has non-pointer  > fields.
> 
> Oh, yes!  Easier still...
> 
> Andrew.
> 
That's probably also the fastest.  For testing purposes, the
GC_IGNORE_GCJ_INFO environment variable should revert to conservative
scans for anything that might contain pointers (not just big objects),
which I think should also avoid the _Jv_MarkObj calls.

The down side of any of this is that there is an increased chance of
accidental storage retention.  Usually that won't be an issue.  But if
it is, it might defeat your goal of reducing memory footprint.  As
Andrew pointed out, the solution is to introduce a mark procedure that
understands long bitmaps. Without reordering fields, that's probably the
best you can do.

Hans



More information about the Java mailing list