Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost::shared::memory consistency
From: Josmon Paul (josmon.paul_at_[hidden])
Date: 2012-01-02 03:52:00


Hi
               I was able to construct the vector of strings using basic_string. But my problem is not exactly that . I want to store objects in vector list and the  member of this object are string type. When i accessing this object from shared memory, i need to get this string also. So is there any  solution for this other than adding strings directly to the vector list.


Josmon Paul

____________________________________________

-----boost-users-bounces@lists.boost.org wrote: -----
To: Boost User List <boost-users@lists.boost.org>
From: Ion Gaztaņaga
Sent by: boost-users-bounces@lists.boost.org
Date: 12/30/2011 04:25AM
Subject: Re: [Boost-users] Boost::shared::memory consistency

El 29/12/2011 14:49, Josmon Paul escribiķ:
> Hi All
> I have a doubt regarding boost shared memory. If i am reading data from
> my shared memory and in between if some other program deletes or
> overwrites the same shared memory then how it will affect the reading.
> Will it throw segmentation fault ? I am expecting a segmentation fault
> but when i wrote a small program to read the memory and in the same time
> i deleted the same memory through another program using the function
> (shared_memory_object::remove ()) the behavior is like, it gave the
> content which was already present in the old shared memory and exited
> without segmentation fault. I would be verymuch grateful if someone
> tells the exact behavior in this situation

POSIX semantics: just like a UNIX unlink call when anotherprocess is
reading a file. The already attached program continues using the old
file. the file is destroyed when the last attached program closes the
file/shm.

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

=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you


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