El 05/04/2012 10:14, Rajalakshmi Iyer escribió:
Hello,
The boost documentation suggests that shared memory interprocess mechanism can have file-system or kernel persistence.
When I create shared memory files on an Ubuntu Linux host, they are created at /var/run/shm. But on a system reboot, the shared memory files go away, which means they are using kernel persistence.
How can I ensure that shared memory files persist across reboots?
You can't, as the OS chooses that. Can't you use memory mapped files? Those are portable and have well-known semantics.. For systems without POSIX support interprocess uses memory mapped files in a temp directory. If you disable POSIX shm detection undefining BOOST_INTERPROCESS_POSIX_SHARED_MEMORY_OBJECTS in boost/interprocess/detail/workaround.hpp then you get shared memory emulation using memory mapped files. Ion