Re: [Boost-users] mixed 32bit and 64bit shared memory
I see notes about boost supporting "customizing offset_ptr" to support shared memory where both 64 bit and 32 bit processes are sharing the memory, but I don't see a specific example of how to do that. It seems that "out of box" it doesn't work.
El 11/01/2013 5:40, Dave Dyer escribió:
I see notes about boost supporting "customizing offset_ptr" to support shared memory where both 64 bit and 32 bit processes are sharing the memory, but I don't see a specific example of how to do that. It seems that "out of box" it doesn't work.
It's not trivial, and it's still experimental. It might not work at all in your platform as Inteprocess depends on other libraries (like pthread mutexes) that can be incompatible between 32 and 64 bit applications. E.g. pthread_mutex_t from glibc can't be shared between 32 bit and 64 bit applications. You need to define an offset_ptr with 64 bit OffsetType typedef offset_ptr<T, std::ptrdiff_t, unsigned long long> my_offset_ptr; and instantiate all interprocess managed resources like (basic_managed_shared_memory) like this: typedef basic_managed_shared_memory <char ,rbtree_best_fit<mutex_family, my_offset_ptr> ,iset_index> managed_shared_memory; Again, this is not supported and it's still experimental. Ion
participants (2)
-
Dave Dyer
-
Ion Gaztañaga