# raj@blismobile.com / 2012-04-05 12:06:29 +0100:
2012/4/5 Ion Gazta?aga
El 05/04/2012 10:14, Rajalakshmi Iyer escribió:
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?
[...]
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.
[...]
However, when I reboot the machine, the files created under /tmp/boost_interprocess are wiped out. Is there anything additional I should be doing?
You should review Ubuntu documentation. That's your system cleaning up the directory (or /tmp might be a memory-backed filesystem). -- roman