Two Windows processes have memory mapped the same shared file. If the file consists of counters, is it appropriate to use the Interlocked* functions (like InterlockedIncrement) to update those counters? Will those synchronize access across processes? Or do I need to use something heavier, like a mutex? Or perhaps the shared-memory mechanism itself ensures consistent views.
Two Windows processes have memory mapped the same shared file. If the file consists
Share
From MSDN:
So, yes, it is safe with your shared memory approach.