We need to share very efficiently block of constantly changing information between two processes. Information fits in 64bits block of memory - so inside one process we'd be able to use Interlocked operations (or probably even just ordinary reads/writes) to ensure lock-free access to correct state of information (not just partially written).
How can we write and ready block of 64bit data into MMF without locking and synchronization in order to make sure that we don't read partially written data? Aren't writes of this size atomic by itself on 64bit architecture? But aligning could probably make it non-atomic, correct?
So is using Interlocked operations (e.g. via the way described in this question: How to use interlocked operations against memory-mapped files in .Net) on MMF the way to go? But couldn't we have the problems with aligning even in this case (as MMF is block of memory and so .NET might not control it's aligning as it does with variables)?