File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 10841084\texttt {read }, \texttt {write }, \texttt {lseek }. After the file is mapped it is
10851085possible to work with it as a data structure in memory. The file is not being
10861086copied 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
10931093via \texttt {open }. The access mode in \texttt {prot } cannot be `` higher'' than
10941094specified in the mode for \texttt {open }.
You can’t perform that action at this time.
0 commit comments