Boost logo

Boost Users :

Subject: Re: [Boost-users] How to use the shared region in append mode
From: manish4gupta (manish_at_[hidden])
Date: 2009-10-02 00:17:45


I found one managed_shared_memory creation constructor.
managed_shared_memory segment(open_or_create,MySharedMemory, 99989);
Does this mean if there exists a region MySharedMemory ,then open it else
create the region "MySharedMemory".

But it does not work like this. How can i solve my pblm.

manish4gupta wrote:
>
> I think it is not copyable so what else can be done?
>
> Roland Bock-2 wrote:
>>
>> manish4gupta wrote:
>>> if(flag == 0)
>>> managed_shared_memory segment(create_only,MySharedMemory, 99989);
>>> else
>>> managed_shared_memory segment(open_only ,MySharedMemory);
>>>
>>>
>>> Error message:
>>> Indexingtest.cpp:41: error: ‘segment’ was not declared in this scope
>>>
>>> How can i overcome such pblm.
>>
>> By reading a good book about C++ :-)
>>
>> You want to learn about scope. Then you have several options. Pointers
>> are one, functions might be another (not sure if managed_shared_memory
>> is copyable).
>>
>> If you go for pointers, familiarize yourself with shared_ptr. Smart
>> pointers are your friends.
>>
>>
>> Regards,
>>
>> Roland
>> _______________________________________________
>> Boost-users mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>>
>
>

-- 
View this message in context: http://www.nabble.com/How-to-use-the-shared-region-in-append-mode-tp25677408p25710290.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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