We need named IPC between Rosetta and native apps. In boost this seems not compatible, for example with Native app and we are unable to find the "MAP_FNAME" in find_and_construct on the Rosetta process.
Works fine when each process is on same arch.
"
typedef boost::interprocess::managed_shared_memory shared_mem;shared_mem* seg;seg = new shared_mem(boost::interprocess::open_or_create, SHARED_FILENAME, F_MAX_TOTALBUF_SIZE );Img = seg->find_or_construct<imgtype>(MAP_FNAME)();
"
Root cause seems to be MemoryAlgorithm and alignment.This has alignment of 16 for Rosetta and 8 for native.The 8 byte shift seems to be the root cause and I can see this when viewing memory.
Looking deeper over the last few days we can see this from the difference in frontend size (from MemoryAlgorithm):
"boost::interprocess::open_or_create
This creates different sized frontend (iset_index 8 or 16)for Native vs Rosetta.
frontend is defined from: boost::interprocess::ipcdetail::basic_managed_memory_impl