Skip to content

Commit 3d82c20

Browse files
committed
On mmap.
1 parent 5ced4b5 commit 3d82c20

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

proc.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,11 +1084,11 @@
10841084
\texttt{read}, \texttt{write}, \texttt{lseek}. After the file is mapped it is
10851085
possible to work with it as a data structure in memory. The file is not being
10861086
copied to the memory as a whole, rather only the pages which are accessed are
1087-
allocated. If it is necessary to free some page, the contents are written back
1088-
to the storage, i.e. the file. That is, if the \texttt{MAP\_SHARED} is used
1089-
-- this way of mapping is therefore equivalent to writing back via
1090-
\texttt{write(2)}) or to the swap -- same copy-on-write mechanism is used
1091-
(when using \texttt{MAP\_PRIVATE}).
1087+
allocated. If it is necessary to free a page, its contents is written back
1088+
to the storage, i.e. the file -- if the \texttt{MAP\_SHARED} is used
1089+
which is equivalent to writing the data back via \texttt{write(2)}. If
1090+
\texttt{MAP\_PRIVATE} was used, the data would be written to the swap on
1091+
page-out.
10921092
\item For the file to be mapped into memory it is first necessary to open it
10931093
via \texttt{open}. The access mode in \texttt{prot} cannot be ``higher'' than
10941094
specified in the mode for \texttt{open}.

0 commit comments

Comments
 (0)