
18 Mar
2008
18 Mar
'08
5:55 p.m.
If I instantiate a shared_memory_object with open_or_create how do I know if it was opened or created? I ask as if it was created I need to create a structure in the mapped region. If it was opened though I must not create a structure (as another program created the structure before and I might overwrite data). I ran into this problem after creating a reader and writer. They exchange data using a shared_memory_object. It would be great if I could start the two programs in any order. But currently the programs don't know which one created and which one opened the shared memory. Do I miss anything or was open_or_create added for another use case? Boris