Boost logo

Boost Users :

Subject: Re: [Boost-users] File-system persistence for boost shared memory files
From: Roman Neuhauser (neuhauser_at_[hidden])
Date: 2012-04-05 08:11:23


# raj_at_[hidden] / 2012-04-05 12:06:29 +0100:
> 2012/4/5 Ion Gazta?aga <igaztanaga_at_[hidden]>
> > 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

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net