static alignment and hash sync

Boehm, Hans hans_boehm@hp.com
Thu Jun 7 15:39:00 GMT 2001


Is it hard to enforce 8 byte alignment for statically allocated class
objects if hash synchronization is enabled? That was definitely my intent.
Is that not currently happening for Linux targets?
(We only need 8 byte alignment, even on 64-bit targets, where it's usually
automatic.)
Separating out any of those three bits packed in with the object address is
nontrivial. It may be possible, but would require substantial thought. The
advantage of the current scheme is that the 3 bits and the object address
can all be updated together in one atomic compare-and-swap operation. It's
not just trying to save a few bits of space.
Hans
> -----Original Message-----
> From: Tony Kimball [ mailto:alk@pobox.com ]
> Sent: Thursday, June 07, 2001 3:11 PM
> To: java@gcc.gnu.org
> Subject: static alignment and hash sync
>>>> I am using gcc HEAD branch for a cygwin target.
> JV_HASH_SYNCHRONIZATION is enabled by the configure script. The
> monitor implementation appears to require double-aligned object
> pointers (to use the 3 low order bits as flags), but the static
> initializers for at least the _Jv_##type##Class objects allocate their
> objects on word-aligned boundaries. This results in assertion
> failures.
>> Personally, I will work around this by disabling hash synchronization.
> I think the proper fix requires some discussion.
>


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /