Porting Boehm-gc to embedded m68k environment

Boehm, Hans hans_boehm@hp.com
Wed Nov 12 18:05:00 GMT 2003


[John and I had a prior off-line discussion.]
The problem is that on M68K pointers are only 2-byte aligned, probably entirely for
historical reasons at this point.  My is that that's hard to fix at this stage,
for library compatibility reasons.  

This has several consequences:

1) It uncovered a bug in the GC descriptor generation code.  It should fall back to
procedure descriptors if it sees any misaligned pointers.

2) It aggravates the root size problems, since the collector needs to look at twice as many
potential pointers, and the probability of finding a false pointer is higher.  (I'm guessing
that this is partially compensated for by the fact that M68K systems are likely to run
with smallish heaps; probably few have them have 2GB of memory.)

Hans

> -----Original Message-----
> From: java-owner@gcc.gnu.org 
> [mailto:java-owner@gcc.gnu.org]On Behalf Of
> Andrew Haley
> Sent: Wednesday, November 12, 2003 6:00 AM
> To: John Neil
> Cc: 'Jeff Sturm'; java@gcc.gnu.org
> Subject: RE: Porting Boehm-gc to embedded m68k environment
> 
> 
> John Neil writes:
>  > >>
>  > >
>  > >> 2.  Are the memory pages returned via the GET_MEM 
> function automatically
>  > >> added to the list of ranges to be ...
>  > >
>  > >No.  Those memory pages are only traced when referenced 
> from a live
>  > >pointer.  (If you did register all of your heap as roots, 
> nothing could
>  > >ever be collected.)
>  > >
>  > OK I found my problem, gcj is incorrectly calculating the 
> boehm descriptor
>  > when the alignment is not the same as sizeof(void*). 
> 
> When the alignment of what is not the same as sizeof(void*)?
> 
> Andrew.
> 



More information about the Java mailing list