Although I've been an advocate of the "no word tearing" rule I'm surprised
that there has been no comment from the VM folk concerning the cost of
avoiding word tearing. If subword accesses are not atomic on a given
architecture then either synchronization of array accesses must be used, or
else subword variables must actually be aligned on word boundaries. The
former seems excessively expensive while the latter would not be appreciated
by people trying to constrain memory usage. Is it simply that subword
accesses are atomic on the architectures most cared about ?
David Holmes
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:37 EDT