logoalt Hacker News

frollogastonyesterday at 12:29 AM2 repliesview on HN

Being really pedantic here, shared memory is considered IPC, but not the kind you're thinking of. Shared address space, no overhead.


Replies

guenthertyesterday at 7:22 AM

As long as we're pedantic ... the subject is shared memory. Unless you specify the same, non-null, target address in the call to mmap (and the kernel happens to grant you that mapping on all calling sites), the addresses will be different; the address space is not shared (each mapping might also have different access permissions).

That distinction is important as pointers generally cannot be shared (a problem which can of course be solved with one more indirection ;-) .

JackSlateuryesterday at 9:10 PM

"Shared address space, no overhead"

But concurrent access, so synchronization is required (lock or whatever), so overhead :)

show 1 reply