|
1125 | 1125 | \item It is possible to share anonymous mapping between processes using |
1126 | 1126 | \texttt{fork()}. The only alternative is shared memory established using |
1127 | 1127 | \texttt{shmat}. |
1128 | | -\item Access to the mapped region beyond the existing page of mapped object |
| 1128 | +\item Access to the mapped region beyond the existing page of a mapped object |
1129 | 1129 | causes \texttt{SIGBUS} or \texttt{SIGSEGV} signal. |
1130 | 1130 | This is not universally true, see example \example{mmap/sigsegv.c}. |
1131 | 1131 | \item When using \texttt{MAP\_FIXED} the new mapping will replace any existing |
|
1143 | 1143 | \item in IRIX it is possible to use \texttt{MAP\_AUTOGROW} that will |
1144 | 1144 | automatically grow mapped object when accessing beyond its current end. |
1145 | 1145 | \end{itemize} |
1146 | | -\item Example of system command using file mapping is \texttt{cat(1)}. |
1147 | | -Using mapped memory is more efficient than calling \texttt{read} repeatedly, |
1148 | | -saving the overhead necessary for switching to kernel and back to userspace. |
| 1146 | +\item Example of a system command using file mapping is \texttt{cat(1)}. Using |
| 1147 | +mapped memory is more efficient than calling \texttt{read} repeatedly, saving |
| 1148 | +the overhead necessary for switching to kernel and back to userspace. |
1149 | 1149 | \end{itemize} |
1150 | 1150 |
|
1151 | 1151 | %%%%% |
|
1188 | 1188 | \end{slide} |
1189 | 1189 |
|
1190 | 1190 | \begin{itemize} |
1191 | | -\item writing the changes to the storage is guaranteed only after |
1192 | | -\texttt{msync} or \texttt{munmap}, however other processes that have the file |
1193 | | -mapped as well will see the changes immediately. |
1194 | | -\item mapping to memory and setting access rights is used by the |
1195 | | -Electric Fence library, which is used for detection of errors when using |
1196 | | -dynamic memory. |
| 1191 | +\item writing changes to the backing storage is guaranteed only after |
| 1192 | +\texttt{msync} or \texttt{munmap}. However other processes that have the file |
| 1193 | +mapped as well will see the memory writes immediately. |
| 1194 | +\item memory mapping and setting access rights is used by the Electric Fence |
| 1195 | +library which is used for error detection on dynamic memory use. |
1197 | 1196 | \end{itemize} |
1198 | 1197 |
|
1199 | | - |
1200 | 1198 | %%%%% |
1201 | 1199 |
|
1202 | 1200 | \begin{slide} |
|
0 commit comments