\hypertarget{evil__mman_8h}{}\doxysection{evil\+\_\+mman.\+h File Reference}
\label{evil__mman_8h}\index{evil\_mman.h@{evil\_mman.h}}


The file that provides the memory map functions.  


\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{evil__mman_8h_a6a982b48b8d3eb8eccd17e0d54ee5379}{P\+R\+O\+T\+\_\+\+N\+O\+NE}}~0x00
\item 
\#define \mbox{\hyperlink{evil__mman_8h_a15bf68ce8b590838b3a5c0b639d8d519}{P\+R\+O\+T\+\_\+\+R\+E\+AD}}~0x01
\item 
\#define \mbox{\hyperlink{evil__mman_8h_a2a79c8ceefb8fc25a940ae07a3d94429}{P\+R\+O\+T\+\_\+\+W\+R\+I\+TE}}~0x02
\item 
\#define \mbox{\hyperlink{evil__mman_8h_a77848f068638e916c72cd543f5ecb815}{P\+R\+O\+T\+\_\+\+E\+X\+EC}}~0x04
\item 
\#define \mbox{\hyperlink{evil__mman_8h_a57028962c2a7c0c802ca6613492f2ef3}{M\+A\+P\+\_\+\+S\+H\+A\+R\+ED}}~0x0001
\item 
\#define \mbox{\hyperlink{evil__mman_8h_a398ef47a991a44389aa9818c98a28d24}{M\+A\+P\+\_\+\+P\+R\+I\+V\+A\+TE}}~0x0002
\item 
\#define \mbox{\hyperlink{evil__mman_8h_a387ec707b30c5e78cf20a14517a63b96}{M\+A\+P\+\_\+\+F\+I\+X\+ED}}~0x0010
\item 
\mbox{\Hypertarget{evil__mman_8h_a298ddbffafbe6cf941b92092edfb86a5}\label{evil__mman_8h_a298ddbffafbe6cf941b92092edfb86a5}} 
\#define {\bfseries M\+A\+P\+\_\+\+A\+N\+ON}~0x0020
\item 
\mbox{\Hypertarget{evil__mman_8h_ae4f86bff73414c5fc08c058f957212f0}\label{evil__mman_8h_ae4f86bff73414c5fc08c058f957212f0}} 
\#define {\bfseries M\+A\+P\+\_\+\+A\+N\+O\+N\+Y\+M\+O\+US}~M\+A\+P\+\_\+\+A\+N\+ON
\item 
\#define \mbox{\hyperlink{evil__mman_8h_a8523dcf952f6ff059a3bed717e4f1296}{M\+A\+P\+\_\+\+F\+A\+I\+L\+ED}}~((void $\ast$)-\/1)
\item 
\mbox{\Hypertarget{evil__mman_8h_ac24e9c0562704d17896d14869e748fcc}\label{evil__mman_8h_ac24e9c0562704d17896d14869e748fcc}} 
\#define {\bfseries H\+A\+V\+E\+\_\+\+M\+M\+AP}~1
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void $\ast$ \mbox{\hyperlink{group__Evil__Mman_ga1a69b9ee2b96ed0934c9f9c433f348ce}{mmap}} (void $\ast$addr, size\+\_\+t len, int prot, int flags, int fd, off\+\_\+t offset)
\begin{DoxyCompactList}\small\item\em Creates or opens a named or unnamed file mapping object for a specified file and maps a view of a file mapping into the address space of a calling process. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__Evil__Mman_ga01ff21bc70401bee9b80c350763087f7}{munmap}} (void $\ast$addr, size\+\_\+t len)
\begin{DoxyCompactList}\small\item\em Unmaps a mapped view of a file from the calling process\textquotesingle{}s address space. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__Evil__Mman_gaa0752189f14ca11ba413fc944ae08b9c}{mprotect}} (void $\ast$addr, size\+\_\+t len, int prot)
\begin{DoxyCompactList}\small\item\em Changes protection for the calling process\textquotesingle{} address. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The file that provides the memory map functions. 



\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{evil__mman_8h_a6a982b48b8d3eb8eccd17e0d54ee5379}\label{evil__mman_8h_a6a982b48b8d3eb8eccd17e0d54ee5379}} 
\index{evil\_mman.h@{evil\_mman.h}!PROT\_NONE@{PROT\_NONE}}
\index{PROT\_NONE@{PROT\_NONE}!evil\_mman.h@{evil\_mman.h}}
\doxysubsubsection{\texorpdfstring{PROT\_NONE}{PROT\_NONE}}
{\footnotesize\ttfamily \#define P\+R\+O\+T\+\_\+\+N\+O\+NE~0x00}

Data can not be accessed. \mbox{\Hypertarget{evil__mman_8h_a15bf68ce8b590838b3a5c0b639d8d519}\label{evil__mman_8h_a15bf68ce8b590838b3a5c0b639d8d519}} 
\index{evil\_mman.h@{evil\_mman.h}!PROT\_READ@{PROT\_READ}}
\index{PROT\_READ@{PROT\_READ}!evil\_mman.h@{evil\_mman.h}}
\doxysubsubsection{\texorpdfstring{PROT\_READ}{PROT\_READ}}
{\footnotesize\ttfamily \#define P\+R\+O\+T\+\_\+\+R\+E\+AD~0x01}

Data can be read. \mbox{\Hypertarget{evil__mman_8h_a2a79c8ceefb8fc25a940ae07a3d94429}\label{evil__mman_8h_a2a79c8ceefb8fc25a940ae07a3d94429}} 
\index{evil\_mman.h@{evil\_mman.h}!PROT\_WRITE@{PROT\_WRITE}}
\index{PROT\_WRITE@{PROT\_WRITE}!evil\_mman.h@{evil\_mman.h}}
\doxysubsubsection{\texorpdfstring{PROT\_WRITE}{PROT\_WRITE}}
{\footnotesize\ttfamily \#define P\+R\+O\+T\+\_\+\+W\+R\+I\+TE~0x02}

Data can be written. \mbox{\Hypertarget{evil__mman_8h_a77848f068638e916c72cd543f5ecb815}\label{evil__mman_8h_a77848f068638e916c72cd543f5ecb815}} 
\index{evil\_mman.h@{evil\_mman.h}!PROT\_EXEC@{PROT\_EXEC}}
\index{PROT\_EXEC@{PROT\_EXEC}!evil\_mman.h@{evil\_mman.h}}
\doxysubsubsection{\texorpdfstring{PROT\_EXEC}{PROT\_EXEC}}
{\footnotesize\ttfamily \#define P\+R\+O\+T\+\_\+\+E\+X\+EC~0x04}

Data can be executed. \mbox{\Hypertarget{evil__mman_8h_a57028962c2a7c0c802ca6613492f2ef3}\label{evil__mman_8h_a57028962c2a7c0c802ca6613492f2ef3}} 
\index{evil\_mman.h@{evil\_mman.h}!MAP\_SHARED@{MAP\_SHARED}}
\index{MAP\_SHARED@{MAP\_SHARED}!evil\_mman.h@{evil\_mman.h}}
\doxysubsubsection{\texorpdfstring{MAP\_SHARED}{MAP\_SHARED}}
{\footnotesize\ttfamily \#define M\+A\+P\+\_\+\+S\+H\+A\+R\+ED~0x0001}

Changes are shared. \mbox{\Hypertarget{evil__mman_8h_a398ef47a991a44389aa9818c98a28d24}\label{evil__mman_8h_a398ef47a991a44389aa9818c98a28d24}} 
\index{evil\_mman.h@{evil\_mman.h}!MAP\_PRIVATE@{MAP\_PRIVATE}}
\index{MAP\_PRIVATE@{MAP\_PRIVATE}!evil\_mman.h@{evil\_mman.h}}
\doxysubsubsection{\texorpdfstring{MAP\_PRIVATE}{MAP\_PRIVATE}}
{\footnotesize\ttfamily \#define M\+A\+P\+\_\+\+P\+R\+I\+V\+A\+TE~0x0002}

Changes are private. \mbox{\Hypertarget{evil__mman_8h_a387ec707b30c5e78cf20a14517a63b96}\label{evil__mman_8h_a387ec707b30c5e78cf20a14517a63b96}} 
\index{evil\_mman.h@{evil\_mman.h}!MAP\_FIXED@{MAP\_FIXED}}
\index{MAP\_FIXED@{MAP\_FIXED}!evil\_mman.h@{evil\_mman.h}}
\doxysubsubsection{\texorpdfstring{MAP\_FIXED}{MAP\_FIXED}}
{\footnotesize\ttfamily \#define M\+A\+P\+\_\+\+F\+I\+X\+ED~0x0010}

Interpret the address (addr) exactly. \mbox{\Hypertarget{evil__mman_8h_a8523dcf952f6ff059a3bed717e4f1296}\label{evil__mman_8h_a8523dcf952f6ff059a3bed717e4f1296}} 
\index{evil\_mman.h@{evil\_mman.h}!MAP\_FAILED@{MAP\_FAILED}}
\index{MAP\_FAILED@{MAP\_FAILED}!evil\_mman.h@{evil\_mman.h}}
\doxysubsubsection{\texorpdfstring{MAP\_FAILED}{MAP\_FAILED}}
{\footnotesize\ttfamily \#define M\+A\+P\+\_\+\+F\+A\+I\+L\+ED~((void $\ast$)-\/1)}

Error return from \mbox{\hyperlink{group__Evil__Mman_ga1a69b9ee2b96ed0934c9f9c433f348ce}{mmap()}}. 