More Effective Use of Shared Memory on Linux
An anonymous reader writes "Making effective use of shared memory in high-level languages such as C++ is not straightforward, but it is possible to overcome the inherent difficulties. This article describes, and includes sample code for, two C++ design patterns that use shared memory on Linux in interesting ways and open the door for more efficient interprocess communication."
The university, ~8 years ago, Concurrent Programming lab:
(talking about ftok)
Me: But, what is done to prevent clashes if different programs use the same key?
Prof: Nothing.
Me: Eh? That's fucking sabotage. (I used "cholerous", but that was in Polish)
Prof: And that's why we won't use SysV IPC in subsequent lessons.
The authors here use a static key of 0x1234...
The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
I suppose everything marked const could be shared.
Well, that should be a safe choice, because no sane person would use 0x1234, therefore this key is still unused.
The Tao of math: The numbers you can count are not the real numbers.
0x1234? Amazing! That's the combination on my luggage!
It's remarkable how one can write an insightful post and yet lose all credibility by choosing not to bother typing the entire word "you". Well done.