I am using boost::interprocess::managed_shared_memory
to create memory to be shared across processes.
Following are the steps taken:
step
a) Create memory.
step
a) Open memory. b) Write to memory
step
a) Open memory. b) Read from memory. c) Open memory. d) Read from memory. e) Open memory. f) Read from memory. g) ...... and so on and so forth!
Now, the question is, in step number 3, I am opening the memory again-and-again before reading it! I think this is redundant behavior.
How can I read multiple number of times by opening it only once?
Actually the open command is quite expensive in terms of performance, and this is proving to be a bottleneck in my application.