alignment test case

Andrew Haley
Wed Mar 19 14:45:00 GMT 2003

Jeff Sturm writes:
 > On Wed, 19 Mar 2003, Andrew Haley wrote:
 > >  > I can't see any way to fix this without fixing the C++ problem.  Well,
 > >  > we could rewrite gcj to use the new ABI, but that's a long way down
 > >  > the road.
 > >
 > > Actually there might be another way: use __attribute__((aligned)) on
 > > java.lang.Object.  Then a subclass can never be more aligned than its
 > > superclass.  Wastes memory, though.
 > I thought that with hash synchronization, boehm-gc always allocates on an
 > 8-byte boundary anyway?  Would aligning Object really waste memory?

A little, because every subclass would also be 8-aligned.

But I don't know that would fix the bug anyway.  I need to understand
what the C++ compiler is doing.


More information about the Java mailing list