I am trying in this way.
I am writing the shared region and its value in a file and read the file in
the map if shared region exits i make the flag = 1 else make the flag =0;
bool flag = 0;
// shared_memory_object::remove(MySharedMemory);
if(flag == 0)
managed_shared_memory segment(create_only,MySharedMemory, 99989);
else
managed_shared_memory segment(open_only ,MySharedMemory);
void_allocator alloc_inst (segment.get_segment_manager()); /
complex_map_type *mymap =
segment.construct
First of all i would like to thank for previous answers. Now i am able to use the shared region to create a map, insert value into shared map and use the shared map. Now moving one step ahead. I am planning to use the shared region in append mode. For instance
1. create shared region if it is not used before // how to check this ? managed_shared_memory segment(create_only,MySharedMemory, 999999999); 2. create map in the region // done 3. open the map and use the map for retrieving and inserting values //done
How i can that the given region already allocated to map so that i can insert the value in it otherwise i can create the that region and create tha map and insert the value in the map.
Thanks in advance.
-- View this message in context: http://www.nabble.com/How-to-use-the-shared-region-in-append-mode-tp25677408... Sent from the Boost - Users mailing list archive at Nabble.com.