As Chris Haas mentioned in his comment, if the shared memory operations aren't going to work for you, you can instead investigate using file mapping operations.
Honestly, I would use a regular file and perform regular reads and writes instead of bothering with file mapping, as Linux is going to be caching in memory any portion of the file that is regularly used. This avoids having to write code especially for file mapping operations.
If you find later that regular file IO is a bottleneck, then switch to file mapping.