I'm not sure how to go about it as I've seen examples of shared memory used for interprocess communication. I was wondering if I could leverage it from within a server to take, say, periodic snapshots of certain objects and dump them in some format in shared memory which..if my program crashes..could be retrieved on restart of the program for partial recovery. Is this feasible? If so, what can I take a look at to get started?
UPDATE: I read somewhere that shared memory on linux (I am on linux) is persistent, so I was thinking I might be able to save state snapshots periodically without the need of a helper process. Say for example, a continuously updating struct which I dump to shared memory every few seconds. The reason I would opt for shared memory instead of a file is purely for speed as state would be a lot of binary data.