
Shibu Bera wrote:
int main() { boost::interprocess::fixed_managed_shared_memory segment ( boost::interprocess::open_or_create, "MySharedMemory", //segment name 1024 * 1024 ); return 0; }
If you are using a fixed address shared memory, you should specify the mapping address, otherwise, you can get a different one each execution. After all, this is what fixed mapping is about ;-) I think I should force the use of an address in this class (currently fixed_managed_shared_memory segment is a typedef of basic_managed_shared_memory segment so by default and an address is not requested). Please, try the same specifying an address (add another parameter to the constructor). The address depends on the OS you are using. Try, for example (void*)0x30000000. Or just use managed_shared_memory segment. Why do you need fixed address mappings? Regards, Ion