On Fri, Nov 8, 2024, at 5:19 AM, Murali Kishore via Boost wrote:
Hi Ion,
I have tried one experiment, copying shared memory from one linux server to another linux server; both are identical w.r.t os and memory configuration. I am able to open shared memory and access stored classes in another server.
want to check with you on this, is there any issues or this procedure is ok to use or any expected abnormal behaviours later. Please help to understand how this works if both servers are identical.
There's no logical distinction between creating a shared memory segment in one process, ending the process and reopening the same segment in a new process and what you describe. I'd personally replace `managed_shared_memory` with `managed_mapped_file` so the intent of treating the mapped segment as a file becomes more clear. In effect, shared memory on linux is just a file in a special kind of filesystem, anyways. Also, you're responsible for keeping track of consistency during copy (e.g. if you copy the data during a mutation, you may incur undefined behavior on use (incl. opening), and/or you may encounter a stuck lock). Seth