[Boost-users] [Interprocess] Unable to list created shared memory via ipcs command

182 views
Skip to first unread message

Leo Giannelli

unread,
Jan 30, 2009, 8:17:51 PM1/30/09
to boost...@lists.boost.org
Hello,

I am a new user of the  Boost Libraries. Currently, I tried the Boost.Interprocess source library with an
example program which creates a shared memory segment and writes a vector into the shared memory. A receiver process
attaches to the named shared memory segment and outputs the vector. This all works has advertized.
 
The one issue is that whenever I try to list the shared memory segment via the ipcs -m command I do not see the shared
memory created from the sender program. This is the code snippet which creates the shared memory:
 
#include <boost/interprocess/managed_shared_memory.hpp>
...
managed_shared_memory segment
         (create_only
         ,"MySharedMemory" //segment name
         ,65536);          //segment size in bytes
...
 
Note: The sender program is running for 5 minutes before terminating and removing
the shared memory. The binaries were built with g++  version 3.4.6 20060404 (Red Hat 3.4.6-8)

RedHat Linux 5:
Kernal Version : uname -a
Linux xxx 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:56:44 EST 2007 x86_64 x86_64 x86_64 GNU/Linux

Best Regards,
Leo

--
Be Yourself @ mail.com!
Choose From 200+ Email Addresses
Get a Free Account at www.mail.com!

Ion Gaztañaga

unread,
Jan 31, 2009, 10:05:06 AM1/31/09
to Boost User List
Leo Giannelli wrote:
> Hello,

>
> The one issue is that whenever I try to list the shared memory segment
> via the ipcs -m command I do not see the shared
> memory created from the sender program. This is the code snippet which
> creates the shared memory:

IPCS is for System V shared memory and not for POSIX shared memory. In
linux, shared memory filesystem is usually mounted in /dev/shm. See your
system documentation or fstab for exact details

Regards,

Ion
_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Reply all
Reply to author
Forward
0 new messages