Keeping shared memory data in the case of reboot?

I am currently using shmget and shmat to create a shared memory between two process. When the process die the shared memory is still alive and restarting the process mean we can start where we were before. But if the machine is turned off then turned on we are losing the data.

I would like to know if there was an option in shmget/shmat or another method to make shared memory between process in order to keep the data alive even in the case of a reboot.

Zone_t being a structure type, i can access every data in ZoneArray[0] from my 2 process without problem.

Right now the only solution i can think of would be to periodicaly write a ini file with the data to "save" the state of the system and when restart it read this file but this would be not flexible at all if the structure must evolve later.

EDIT : following the idea of @Wumpus Q. Wumbley i tried to use mmap with msync this way :

Still not perfect since everywhere in my former code i was using my memory without pointer form (Zone[0].param is now Zone[0]->param for example) but this is a step forward, thanks to @Wumpus Q. Wumbley.

If you mmap a regular file with MAP_SHARED, you effectively have a shm segment that is also a permanent file. The copy on disk will lag behind the copy in memory, but you can call msync to flush it periodically.

Email codedump link for Keeping shared memory data in the case of reboot?