shared memory between 32b and 64b
Looked promising, but not quite good enough. I dedined:
typedef offset_ptr
El 16/01/2013 1:33, Dave Dyer escribió:
Looked promising, but not quite good enough. I dedined:
typedefoffset_ptr
my_offset_ptr; typedef basic_managed_shared_memory
,iset_index> compat32_shared_memory; in the win64 process I do
compat32_shared_memory segment(create_only, SEGMENT_NAME, SEGMENT_SIZE); comm *command = segment.construct<comm>( "CommandBlock" )();
in the win32 process in do
compat32_shared_memory segment(open_only, SEGMENT_NAME); std::pair
com = segment.find<comm>("CommandBlock"); the "find" never returns.
The code works fine if both processes are win32 or both are win64 Am I on the right track?
Sorry about my previous reply. I just noticed that the definition for my_offset_ptr must be binary compatible in 32 and 64 bit processes so std::ptrdiff_t should not be used (as it's 32 bit in 32 processes and 64 bit in 64 bit processes). Try with something like: typedef offset_ptr< void , boost::int32_t , boost::uint64_t > my_void_offset_ptr; or typedef offset_ptr< void , boost::int64_t , boost::uint64_t > my_void_offset_ptr; Good luck! Ion
participants (2)
-
Dave Dyer
-
Ion Gaztañaga