JavaMemoryModel: Moving memory operations across external actions

From: Bill Pugh (pugh@cs.umd.edu)
Date: Wed Apr 14 2004 - 18:01:12 EDT


Say that external() is a function that interacts
with the world outside of a JVM (e.g., it writes
to a socket). For simplicity's sake, assume it both
influences and is influenced by the outside world.

Would a compiler ever want to reorder

        * a read of a variable and a following
          call to external() ?

        * a call to external() and a following
          write to a variable?

   In these cases, I talking about a normal,
non-volatile variable.

Bill

-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:01:04 EDT