kaffe-0.8.x garbage collection problem (at least on m68k)

Esa Salonen es at vat-vai.valmet.com
Mon Mar 3 22:40:02 PST 1997


> Erm, does this mean that on the m68k pointers aren't aligned to 4 byte
> boundaries within structures - shurely shome mistake.

When looking at gcc config/m68k this is the default alignment setting:
/* Alignment of field after `int : 0' in a structure.  */
#define EMPTY_FIELD_BOUNDARY 16

(Only two conficurations override this in gcc-2.7.2: m68kv4.h and ccur-GAS.h:
/* Alignment of field after `int : 0' in a structure.
   For m68k/SVR4, this is the next longword boundary. */

#undef EMPTY_FIELD_BOUNDARY
#define EMPTY_FIELD_BOUNDARY 32
)

That means that pointers (and other multibyte fields) are 16 bit aligned
in structures. So in structures like 
typedef struct _constants {
	u2		size; /* u2 is 2 bytes */
	u1*		tags;
	ConstSlot*	data;
} constants;

tags and data poiters are 2 byte aligned and also all fields in
struct _classes after constants field. 

I first tought that fixing struct _constants makes garbage collection work
OK, but there seems to be other problems also in the non incremental mode,
possibly similar alignment problems in other structures also ? 


More information about the kaffe mailing list