projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
718aee5
)
Move some FAQs into the specification for mmap'd files.
author
Ben Pfaff
<blp@cs.stanford.edu>
Wed, 4 Jan 2006 18:53:03 +0000
(18:53 +0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Wed, 4 Jan 2006 18:53:03 +0000
(18:53 +0000)
doc/vm.texi
patch
|
blob
|
history
diff --git
a/doc/vm.texi
b/doc/vm.texi
index e44dacdc6ed30ccfb749777e1a18428f10040701..6b07490b56fa8412e0113deac5a47226f7b7c331 100644
(file)
--- a/
doc/vm.texi
+++ b/
doc/vm.texi
@@
-556,6
+556,11
@@
implicitly or explicitly, all pages written to by the process are
written back to the file, and pages not written must not be. The pages
are then removed from the process's list of virtual pages.
written back to the file, and pages not written must not be. The pages
are then removed from the process's list of virtual pages.
+Closing or removing a file does not unmap any of its mappings. Once
+created, a mapping is valid until @code{munmap} is called or the process
+exits, following the Unix convention. @xref{Removing an Open File}, for
+more information.
+
If two or more processes map the same file, there is no requirement that
they see consistent data. Unix handles this by making the two mappings
share the same physical page, but the @code{mmap} system call also has
If two or more processes map the same file, there is no requirement that
they see consistent data. Unix handles this by making the two mappings
share the same physical page, but the @code{mmap} system call also has
@@
-696,14
+701,4
@@
munmap (map);
The @command{mcp} program in @file{src/examples} shows how to copy a
file using memory-mapped I/O.
The @command{mcp} program in @file{src/examples} shows how to copy a
file using memory-mapped I/O.
-
-@item What happens if a user removes a @code{mmap}'d file?
-
-The mapping should remain valid, following the Unix convention.
-@xref{Removing an Open File}, for more information.
-
-@item If a user closes a mapped file, should it be automatically unmapped?
-
-No. Once created the mapping is valid until @code{munmap} is called
-or the process exits.
@end table
@end table