question about file mapping
adam at os.inf.tu-dresden.de
Sun May 17 23:13:47 CEST 2015
On Wed May 13, 2015 at 14:24:35 +0800, yang.wei9 at zte.com.cn wrote:
> I create a file on tmpfs, and it read/write works fine. However, it cannot
> mmap, and returns EINVAL.
> I found the reason is that dataspace of the file is not valid.
> L4::Cap<L4Re::Dataspace> fds = fi->data_space()
> if (!fds.is_valid())
> return -EINVAL;
> How to make it valid? Is there another method to do file mapping?
tmpfs does not currently implement mmap, that's why it does not work. To
make it work we'd need use memory more wasteful inside tmpfs than
currently. Maybe it's worth it.
Adam adam at os.inf.tu-dresden.de
More information about the l4-hackers