\doxysection{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$>$}\newline
\doxysubsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \textbf{ mmio\+\_\+file\+\_\+s} \textbf{ mmio\+\_\+file\+\_\+t}
\begin{DoxyCompactList}\small\item\em Abstract structure representing a memory-\/mapped file. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ mmio\+\_\+file\+\_\+t} $\ast$ \textbf{ mmio\+\_\+file\+\_\+read} (const char $\ast$filename)
\begin{DoxyCompactList}\small\item\em Memory-\/map a file for reading. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT void $\ast$ \textbf{ mmio\+\_\+file\+\_\+ptr} (\textbf{ mmio\+\_\+file\+\_\+t} $\ast$mf)
\begin{DoxyCompactList}\small\item\em Get a pointer to the memory mapped for a file. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT void \textbf{ mmio\+\_\+file\+\_\+unmap} (\textbf{ mmio\+\_\+file\+\_\+t} $\ast$mf)
\begin{DoxyCompactList}\small\item\em Unmap a file, releasing memory associated with it. \end{DoxyCompactList}\end{DoxyCompactItemize}


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

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


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



\doxysubsection{Typedef Documentation}
\label{mmio_8h_ae27ed04d8142d77aae885c8cb8c9fa3b} 
\index{mmio.h@{mmio.h}!mmio\_file\_t@{mmio\_file\_t}}
\index{mmio\_file\_t@{mmio\_file\_t}!mmio.h@{mmio.h}}
\doxysubsubsection{mmio\_file\_t}
{\footnotesize\ttfamily typedef struct \textbf{ mmio\+\_\+file\+\_\+s} \textbf{ mmio\+\_\+file\+\_\+t}}



Abstract structure representing a memory-\/mapped file. 



Definition at line \textbf{ 59} of file \textbf{ mmio.\+h}.



\doxysubsection{Function Documentation}
\label{mmio_8h_a923d1261b4784fda4ecf42cd5bfff575} 
\index{mmio.h@{mmio.h}!mmio\_file\_ptr@{mmio\_file\_ptr}}
\index{mmio\_file\_ptr@{mmio\_file\_ptr}!mmio.h@{mmio.h}}
\doxysubsubsection{mmio\_file\_ptr()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT void $\ast$ mmio\+\_\+file\+\_\+ptr (\begin{DoxyParamCaption}\item[{\textbf{ mmio\+\_\+file\+\_\+t} $\ast$}]{mf }\end{DoxyParamCaption})}



Get a pointer to the memory mapped for a file. 



Definition at line \textbf{ 251} of file \textbf{ mmio.\+c}.



Referenced by \textbf{ logmath\+\_\+read()}.

\label{mmio_8h_a8a4bf5292bcd891e75e56466b2febf32} 
\index{mmio.h@{mmio.h}!mmio\_file\_read@{mmio\_file\_read}}
\index{mmio\_file\_read@{mmio\_file\_read}!mmio.h@{mmio.h}}
\doxysubsubsection{mmio\_file\_read()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ mmio\+\_\+file\+\_\+t} $\ast$ mmio\+\_\+file\+\_\+read (\begin{DoxyParamCaption}\item[{const char $\ast$}]{filename }\end{DoxyParamCaption})}



Memory-\/map a file for reading. 

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


Definition at line \textbf{ 206} of file \textbf{ mmio.\+c}.



References \textbf{ ckd\+\_\+calloc}, \textbf{ E\+\_\+\+ERROR\+\_\+\+SYSTEM}, and \textbf{ mmio\+\_\+file\+\_\+read()}.



Referenced by \textbf{ logmath\+\_\+read()}, and \textbf{ mmio\+\_\+file\+\_\+read()}.

\label{mmio_8h_a341a9c1cc8a3c4bddfd2d29a1b0993f6} 
\index{mmio.h@{mmio.h}!mmio\_file\_unmap@{mmio\_file\_unmap}}
\index{mmio\_file\_unmap@{mmio\_file\_unmap}!mmio.h@{mmio.h}}
\doxysubsubsection{mmio\_file\_unmap()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT void mmio\+\_\+file\+\_\+unmap (\begin{DoxyParamCaption}\item[{\textbf{ mmio\+\_\+file\+\_\+t} $\ast$}]{mf }\end{DoxyParamCaption})}



Unmap a file, releasing memory associated with it. 



Definition at line \textbf{ 240} of file \textbf{ mmio.\+c}.



References \textbf{ ckd\+\_\+free()}, and \textbf{ E\+\_\+\+ERROR\+\_\+\+SYSTEM}.



Referenced by \textbf{ logmath\+\_\+free()}.

