• Uncategorized

About linux : Relation-between-shmopen-and-mmap

Question Detail

I have read many shm_open docs. All of the docs are showing how it should be used with mmap. I didn’t get why it should be used with mmap? What does mmap do extra from shm_open? The docs states:

shm_open() is analogous to that of open().

If this is true, then why can’t I read/write directly to the shared memory object, just like regular files with open(). If shm_open and mmap should always be used together, why they didn’t just merge them into one API?

Question Answer

No answer for now.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.