Memory Barriers

Article by:
Date Published:
Last Modified:


The one rule that compile-time and runtime memory re-ordering follows:

Never modify the behaviour of a **single threaded program**. - Memory re-ordering algorithms

However, if you are designing a multi-threaded program, you are out of luck. Memory re-ordering can mess with what you expect shared data to equal at any point in time.

Read the great tutorial on memory barriers at


Geoffrey Hunter

Dude making stuff.

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License .

Related Content


comments powered by Disqus