How can you read what I am doing just now?????
Yes, I was just working with fpmmap on linux and windows createfilemapping
That can be made cross-platform too. Integers are atomic and there is no actual file IO, since on Linux the value is stored in /tmp and that directory is typically on RAM (tmpfs). On Windows it is also in memory for such small values, which are also atomic. In both cases it has incredibly low overhead.