\section{include/sphinxbase/mmio.h File Reference}
\label{mmio_8h}\index{include/sphinxbase/mmio.\+h@{include/sphinxbase/mmio.\+h}}


Memory-\/mapped I/\+O wrappers for files.  


{\ttfamily \#include $<$sphinxbase/sphinxbase\+\_\+export.\+h$>$}\\*
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct {\bf mmio\+\_\+file\+\_\+s} {\bf mmio\+\_\+file\+\_\+t}\label{mmio_8h_ae27ed04d8142d77aae885c8cb8c9fa3b}

\begin{DoxyCompactList}\small\item\em Abstract structure representing a memory-\/mapped file. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
S\+P\+H\+I\+N\+X\+B\+A\+S\+E\+\_\+\+E\+X\+P\+O\+R\+T {\bf mmio\+\_\+file\+\_\+t} $\ast$ {\bf mmio\+\_\+file\+\_\+read} (const char $\ast$filename)
\begin{DoxyCompactList}\small\item\em Memory-\/map a file for reading. \end{DoxyCompactList}\item 
S\+P\+H\+I\+N\+X\+B\+A\+S\+E\+\_\+\+E\+X\+P\+O\+R\+T void $\ast$ {\bf mmio\+\_\+file\+\_\+ptr} ({\bf mmio\+\_\+file\+\_\+t} $\ast$mf)\label{mmio_8h_a5e6d8bf5cd7785563abc18c70a31ce0d}

\begin{DoxyCompactList}\small\item\em Get a pointer to the memory mapped for a file. \end{DoxyCompactList}\item 
S\+P\+H\+I\+N\+X\+B\+A\+S\+E\+\_\+\+E\+X\+P\+O\+R\+T void {\bf mmio\+\_\+file\+\_\+unmap} ({\bf mmio\+\_\+file\+\_\+t} $\ast$mf)\label{mmio_8h_a341a9c1cc8a3c4bddfd2d29a1b0993f6}

\begin{DoxyCompactList}\small\item\em Unmap a file, releasing memory associated with it. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Memory-\/mapped I/\+O wrappers for files. 

\begin{DoxyAuthor}{Author}
David Huggins-\/\+Daines {\tt dhuggins@cs.\+cmu.\+edu} 
\end{DoxyAuthor}


Definition in file {\bf mmio.\+h}.



\subsection{Function Documentation}
\index{mmio.\+h@{mmio.\+h}!mmio\+\_\+file\+\_\+read@{mmio\+\_\+file\+\_\+read}}
\index{mmio\+\_\+file\+\_\+read@{mmio\+\_\+file\+\_\+read}!mmio.\+h@{mmio.\+h}}
\subsubsection[{mmio\+\_\+file\+\_\+read}]{\setlength{\rightskip}{0pt plus 5cm}S\+P\+H\+I\+N\+X\+B\+A\+S\+E\+\_\+\+E\+X\+P\+O\+R\+T {\bf mmio\+\_\+file\+\_\+t}$\ast$ mmio\+\_\+file\+\_\+read (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{filename}
\end{DoxyParamCaption}
)}\label{mmio_8h_ae3367a51a50a6108178ecfdd6c983c61}


Memory-\/map a file for reading. 

\begin{DoxyReturn}{Returns}
a mmio\+\_\+file\+\_\+t $\ast$ or N\+U\+L\+L for failure. 
\end{DoxyReturn}


Definition at line 206 of file mmio.\+c.



References ckd\+\_\+calloc, and E\+\_\+\+E\+R\+R\+O\+R\+\_\+\+S\+Y\+S\+T\+E\+M.



Referenced by logmath\+\_\+read().

