> -----Original Message-----
> From: Bill Pugh [mailto:firstname.lastname@example.org]
> The CLI/C# spec is done, and is available from:
> http://www.ecma.ch/ecma1/STAND/ecma-334.htm (C# spec)
> http://www.ecma.ch/ecma1/STAND/ecma-335.htm (CLI spec)
> http://www.ecma.ch/ecma1/techrep/e-tr-084.htm (CLI libraries?)
> The CLI memory model is described on pages 92-95 of partition I of
> the CLI spec.
> * Word tearing is defined to occur. If threads write
> adjacent bytes
> without synchronization, it is a data race and one of the writes may
> be lost.
Reading section 11.7, I come to the same conclusion that you did. But
"A conforming CLI shall guarantee that read and write access to properly
aligned memory locations no larger than the native word size (the size of
type native int)is atomic (see clause 11.6.2). Atomic writes shall alter no
bits other than those written. Unless explicit layout control (see Partition
II (Controlling Instance Layout))is used to alter the default behavior, data
elements no larger than the natural word size (the size of a native
int)shall be properly aligned. Object references shall be treated as though
they are stored in the native word size."
This leads me to the opposite conclusion. Has someone understood how to
reconcile these? Did I miss something?
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:36 EDT