a few boost interprocess question

Hi, i just started using boost interprocess for giving shared memory access to one of my program to the debugger. It is just superb! but as usual there are a few questions and clarifications, 1) can i find any document saying which of the stl containers are "shared memory safe" so that i dont need to use the special one provided ? esp which of the stl containers from msvc 7.1 (2003) are shmm safe . 2) how can i make my hand crafted container shmm compatible ? I take allocater as param, pointer & ref are typedef from allocater, all construct & destroy are done using allocator. thanks again for the wonderful library abir

Abir Basak wrote:
Hi, i just started using boost interprocess for giving shared memory access to one of my program to the debugger. It is just superb! but as usual there are a few questions and clarifications, 1) can i find any document saying which of the stl containers are "shared memory safe" so that i dont need to use the special one provided ? esp which of the stl containers from msvc 7.1 (2003) are shmm safe . 2) how can i make my hand crafted container shmm compatible ? I take allocater as param, pointer & ref are typedef from allocater, all construct & destroy are done using allocator.
thanks again for the wonderful library abir
------------------------------------------------------------------------
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
I successfully loaded my container in the shared memory after a little modification. It seems allocator.hpp doesnt have a construct method which takes a value type. So i changed it to void construct(const pointer &ptr,const value_type& value = value_type()) however i failed to use std::vector with shared memory. There is another concern, can i use polymorphic class in shamm ? i.e whether vtable and rtti info will be in shamm for th object also ... thanks abir

abir basak wrote:
I successfully loaded my container in the shared memory after a little modification. It seems allocator.hpp doesnt have a construct method which takes a value type. So i changed it to void construct(const pointer &ptr,const value_type& value = value_type()) however i failed to use std::vector with shared memory.
The last SVN version recovers "construct". I recommend you downloading the latest version from SVN or wait the soon to be released Boost 1.35 release candidate.
There is another concern, can i use polymorphic class in shamm ? i.e whether vtable and rtti info will be in shamm for th object also ...
No polymorphism, no virtual base classes and avoid non-const statics. All is explained in Interprocess documentation.
thanks abir
Regards, Ion

Hi, Abir Basak wrote:
Hi, i just started using boost interprocess for giving shared memory access to one of my program to the debugger. It is just superb! but as usual there are a few questions and clarifications, 1) can i find any document saying which of the stl containers are "shared memory safe" so that i dont need to use the special one provided
I don't know any STL implementation that is safe to be used with shared memory. msvc-7.1 ones were "close" but I got some compilation errors.
participants (3)
-
abir basak
-
Abir Basak
-
Ion Gaztañaga