[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-newbie
Subject: use cases for mmap
From: Kun Huang <gareth () openstacker ! org>
Date: 2014-05-16 2:14:30
Message-ID: CAMKaFC_OoDFjD-2a0GNYEPANVxXztCQL15U5u-zNFqR5Ud2J6g () mail ! gmail ! com
[Download RAW message or body]
Hi guys
I'm reading&learning kernel codes and have a question for mmap. Many
guys said mmap is good for sharing data between processes[0]. But how
does mmap do that?
In document, mmap is defined as:
mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset)
That addr is virtual address and different processes have different
address space. So after put a file into memory via addr$offsett, how
does another process read that data?
Btw, are there some common use cases for mmap, in application layer?
[0] http://stackoverflow.com/questions/258091/when-should-i-use-mmap-for-file-access
Thanks :)
Gareth
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic