Sharing memory between two processes

c, linux

Solution

shm_open is your friend. You can unmap the shared region by using shm_unlink.

Problem

I want to share memory between two processes. One way I know is to `mmap` a shared file. However, I don't want to use a shared file, I want an anonymous mapping in the memory. How can I do that.

Original source