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.
shm_open is your friend. You can unmap the shared region by using shm_unlink.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With