\section{KVMAllocator Class Reference}
\label{classKVMAllocator}\index{KVMAllocator@{KVMAllocator}}
KVMAllocator is a virtual memory allocator.  


{\tt \#include $<$kvmallocator.h$>$}

\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
struct {\bf KVMAllocator} ()
\item 
{\bf $\sim$KVMAllocator} ()
\item 
Block $\ast$ {\bf allocate} (size\_\-t \_\-size)
\item 
void {\bf free} (Block $\ast$block)
\item 
bool {\bf copy\-Block} (void $\ast$dest, Block $\ast$src, int \_\-offset=0, size\_\-t length=0)
\item 
void {\bf copy} (void $\ast$dest, Block $\ast$src, int \_\-offset=0, size\_\-t length=0) KDE\_\-DEPRECATED
\item 
bool {\bf copy\-Block} (Block $\ast$dest, void $\ast$src, int \_\-offset=0, size\_\-t length=0)
\item 
void {\bf copy} (Block $\ast$dest, void $\ast$src, int \_\-offset=0, size\_\-t length=0) KDE\_\-DEPRECATED
\item 
void $\ast$ {\bf map} (Block $\ast$block)
\item 
void {\bf unmap} (Block $\ast$block)
\end{CompactItemize}


\subsection{Detailed Description}
KVMAllocator is a virtual memory allocator. 

Memory is allocated block-wise in a tmp file.

\begin{Desc}
\item[Author:]Waldo Bastian $<${\tt bastian@kde.org}$>$ \end{Desc}




Definition at line 39 of file kvmallocator.h.

\subsection{Constructor \& Destructor Documentation}
\index{KVMAllocator@{KVMAllocator}!KVMAllocator@{KVMAllocator}}
\index{KVMAllocator@{KVMAllocator}!KVMAllocator@{KVMAllocator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KVMAllocator::KVMAllocator ()}\label{classKVMAllocator_a0}


Create a KVMAllocator. 



Definition at line 63 of file kvmallocator.cpp.\index{KVMAllocator@{KVMAllocator}!~KVMAllocator@{$\sim$KVMAllocator}}
\index{~KVMAllocator@{$\sim$KVMAllocator}!KVMAllocator@{KVMAllocator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KVMAllocator::$\sim${\bf KVMAllocator} ()}\label{classKVMAllocator_a1}


Destruct the KVMAllocator and release all memory. 



Definition at line 73 of file kvmallocator.cpp.

\subsection{Member Function Documentation}
\index{KVMAllocator@{KVMAllocator}!allocate@{allocate}}
\index{allocate@{allocate}!KVMAllocator@{KVMAllocator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KVMAllocator::Block $\ast$ KVMAllocator::allocate (size\_\-t {\em \_\-size})}\label{classKVMAllocator_a2}


Allocate a virtual memory block. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-size}]Size in bytes of the memory block. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the allocated memory block \end{Desc}


Definition at line 84 of file kvmallocator.cpp.

References QMap::begin(), QMap::end(), endl(), QMap::replace(), and QMap::size().\index{KVMAllocator@{KVMAllocator}!free@{free}}
\index{free@{free}!KVMAllocator@{KVMAllocator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KVMAllocator::free (Block $\ast$ {\em block})}\label{classKVMAllocator_a3}


Free a virtual memory block. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em block}]the block to free \end{description}
\end{Desc}


Definition at line 132 of file kvmallocator.cpp.

References QMap::end(), endl(), QMap::find(), QMap::remove(), and QMap::replace().\index{KVMAllocator@{KVMAllocator}!copyBlock@{copyBlock}}
\index{copyBlock@{copyBlock}!KVMAllocator@{KVMAllocator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KVMAllocator::copy\-Block (void $\ast$ {\em dest}, Block $\ast$ {\em src}, int {\em \_\-offset} = {\tt 0}, size\_\-t {\em length} = {\tt 0})}\label{classKVMAllocator_a4}


Copy {\tt length} bytes from {\tt \_\-offset} in the virtual memory block {\tt src} to normal memory at address $\ast$dest. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dest}]the destination of the data \item[{\em src}]the source block \item[{\em \_\-offset}]the offset in the source block \item[{\em length}]the length of the data to copy \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true on success, false on failure, see errno for details \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 193 of file kvmallocator.cpp.

Referenced by copy().\index{KVMAllocator@{KVMAllocator}!copy@{copy}}
\index{copy@{copy}!KVMAllocator@{KVMAllocator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KVMAllocator::copy (void $\ast$ {\em dest}, Block $\ast$ {\em src}, int {\em \_\-offset} = {\tt 0}, size\_\-t {\em length} = {\tt 0})}\label{classKVMAllocator_a5}


Copy data from a virtual memory block to normal memory. 

\begin{Desc}
\item[{\bf Deprecated}]\end{Desc}
\begin{Desc}
\item[See also:]{\bf copy\-Block}{\rm (p.\,\pageref{classKVMAllocator_a4})} \end{Desc}


Definition at line 187 of file kvmallocator.cpp.

References copy\-Block().\index{KVMAllocator@{KVMAllocator}!copyBlock@{copyBlock}}
\index{copyBlock@{copyBlock}!KVMAllocator@{KVMAllocator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KVMAllocator::copy\-Block (Block $\ast$ {\em dest}, void $\ast$ {\em src}, int {\em \_\-offset} = {\tt 0}, size\_\-t {\em length} = {\tt 0})}\label{classKVMAllocator_a6}


Copy {\tt length} bytes from normal memory at address {\tt src} to {\tt \_\-offset} in the virtual memory block {\tt dest}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dest}]the block to copy the data to \item[{\em src}]the source location of the data \item[{\em \_\-offset}]the offset in the destination block \item[{\em length}]the length of the data to copy \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true on success, false on failure, see errno for details \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 229 of file kvmallocator.cpp.\index{KVMAllocator@{KVMAllocator}!copy@{copy}}
\index{copy@{copy}!KVMAllocator@{KVMAllocator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KVMAllocator::copy (Block $\ast$ {\em dest}, void $\ast$ {\em src}, int {\em \_\-offset} = {\tt 0}, size\_\-t {\em length} = {\tt 0})}\label{classKVMAllocator_a7}


Copy data from normal memory to a virtual memory block. 

\begin{Desc}
\item[{\bf Deprecated}]\end{Desc}
\begin{Desc}
\item[See also:]{\bf copy\-Block}{\rm (p.\,\pageref{classKVMAllocator_a4})} \end{Desc}


Definition at line 223 of file kvmallocator.cpp.

References copy\-Block().\index{KVMAllocator@{KVMAllocator}!map@{map}}
\index{map@{map}!KVMAllocator@{KVMAllocator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void $\ast$ KVMAllocator::map (Block $\ast$ {\em block})}\label{classKVMAllocator_a8}


Map a virtual memory block in memory. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em block}]the block to map \end{description}
\end{Desc}


Definition at line 253 of file kvmallocator.cpp.\index{KVMAllocator@{KVMAllocator}!unmap@{unmap}}
\index{unmap@{unmap}!KVMAllocator@{KVMAllocator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KVMAllocator::unmap (Block $\ast$ {\em block})}\label{classKVMAllocator_a9}


Unmap a virtual memory block. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em block}]the block to unmap \end{description}
\end{Desc}


Definition at line 268 of file kvmallocator.cpp.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kvmallocator.h\item 
kvmallocator.cpp\end{CompactItemize}
