Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In order to optimise performance, the JVM uses a "pseudo memory barrier" in code to act as a fencing instruction when synchronizing across multiple processors. It is possible to revert back to a "true" memory barrier instruction, but this can have a noticeable (and bad) effect upon performance.</p> <p>The use of <code>-XX:+UseMembar</code> causes the VM to revert back to true memory barrier instructions. This parameter was originally intended to exist temporarily as a verification mechanism of the new pseudo-barrier logic, but it turned out that the new pseudo-memory barrier code introduced some synchronization issues. I believe these are now fixed, but until they were, the acceptable way to get around these issues was to use the reinstated flag.</p> <p>The bug was introduced in 1.5, and I believe the flag exists in 1.5 and 1.6.</p> <p>I've google-fu'ed this from a variety of mailing lists and JVM bugs:</p> <ul> <li><a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6546278" rel="nofollow noreferrer">http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6546278</a></li> <li><a href="http://en.wikipedia.org/wiki/Memory_barrier" rel="nofollow noreferrer">The obligatory Wikipedia link to memory barriers (fencing instructions)</a></li> <li><a href="http://blogs.msdn.com/oldnewthing/archive/2004/05/28/143769.aspx" rel="nofollow noreferrer">A classic post from Raymond Chen</a></li> <li><a href="https://stackoverflow.com/questions/286629/what-is-a-memory-fence">SO question on fencing</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload