I create two independent C++ console apps, one called server and other called client. Server creates and shares a memory, the client mostly reads it, but sets some signalling server to exit. Although the client exists properly along with proper memory checking, the server is never able to read the value set by client and hence never exists! Please advice.
Everything works now. There was a problem with the syntax and understanding of the memory size here :
This:
*(mem + region.get_size()) = '*';
Should be this:
mem[region.get_size() - 1] = '*';