Subject: [boost] boost::interprocess mixing heap and shared memory ?
From: Oncaphillis (oncaphillis_at_[hidden])
Date: 2009-04-11 08:26:16
Working with boost::interprocess I came across the following question.
using namespace boost::interprocess;
// ... Assume that I've declared all the necessary allocators
// ... for chars and std::pair<my_string,my_string> here
typedef basic_string<char,my_char_allocator_t> my_string;
my_map *the_map = some_how_construct_map_in_shared_memory(shm);
// So now I have a map residing in shared memory
// The only way to search within this map I could
// find was the following.
my_map::iterator i =
This might throw since the search string is constructed within shared
although it is only needed temporary and destructed right after the
Is there a way to use heap or stack memory for thinks like that ?
Thank you very much
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk