Slashdot Mirror


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."

5 of 280 comments (clear)

  1. Re:SysV IPC is obsolete by KiloByte · · Score: 3, Funny

    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.
  2. const by hey · · Score: 3, Funny

    I suppose everything marked const could be shared.

  3. Re:SysV IPC is obsolete by maxwell+demon · · Score: 5, Funny
    The authors here use a static key of 0x1234...

    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.
  4. Re:SysV IPC is obsolete by Anonymous Coward · · Score: 5, Funny

    0x1234? Amazing! That's the combination on my luggage!

  5. Re:There are better ways by Anonymous Coward · · Score: 1, Funny

    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.