[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What happens to mappings when closing file?
From: |
Marcus Brinkmann |
Subject: |
Re: What happens to mappings when closing file? |
Date: |
4 Apr 2010 13:00:01 +0200 |
User-agent: |
Thunderbird 2.0.0.24 (X11/20100317) |
olafBuddenhagen@gmx.net wrote:
> Hi,
>
> I'm trying to understand why filesystem servers need proxy memory
> objects for io_map(). Unfortunately, I don't have time to read all the
> relevant code right now... After a quick glance, my guess is that the
> proxy objects are used so the same pager can be provided to several
> clients mapping the same file, but with different permissions?
Yes. The underlying limitation is that double-paging is evil.
> But if several clients share a pager, doesn't that mean there is no way
> to shut down an individual client's mapping when the client closes the
> file?
Closing a file does not remove the mappings. From glibc manual on mmap:
"A new reference for the file specified by FILEDES is created, which
is not removed by closing the file.
Thanks,
Marcus