\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 
{\bf KVMAllocator} ()
\begin{CompactList}\small\item\em Create a KVMAllocator. \item\end{CompactList}\item 
{\bf $\sim$KVMAllocator} ()
\begin{CompactList}\small\item\em Destruct the KVMAllocator and release all memory. \item\end{CompactList}\item 
Block $\ast$ {\bf allocate} (size\_\-t \_\-size)
\begin{CompactList}\small\item\em Allocate a virtual memory block. \item\end{CompactList}\item 
void {\bf free} (Block $\ast$block)
\begin{CompactList}\small\item\em Free a virtual memory block. \item\end{CompactList}\item 
void {\bf copy} (void $\ast$dest, Block $\ast$src, int \_\-offset=0, size\_\-t length=0)
\begin{CompactList}\small\item\em Copy {\tt length} bytes from {\tt \_\-offset} in the virtual memory block {\tt src} to normal memory at address $\ast$dest. \item\end{CompactList}\item 
void {\bf copy} (Block $\ast$dest, void $\ast$src, int \_\-offset=0, size\_\-t length=0)
\begin{CompactList}\small\item\em Copy {\tt length} bytes from normal memory at address {\tt src} to {\tt \_\-offset} in the virtual memory block {\tt dest}. \item\end{CompactList}\item 
void $\ast$ {\bf map} (Block $\ast$block)
\begin{CompactList}\small\item\em Map a virtual memory block in memory. \item\end{CompactList}\item 
void {\bf unmap} (Block $\ast$block)
\begin{CompactList}\small\item\em Unmap a virtual memory block. \item\end{CompactList}\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}
\begin{Desc}
\item[Version:]\begin{Desc}
\item[Id]{\bf kvmallocator.h}{\rm (p.\,\pageref{kvmallocator_8h})},v 1.5 2002/09/14 17:15:10 tjansen Exp \end{Desc}
\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::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.\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} = 0, size\_\-t {\em length} = 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}


Definition at line 187 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} = 0, size\_\-t {\em length} = 0)}\label{classKVMAllocator_a5}


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}


Definition at line 210 of file kvmallocator.cpp.\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_a6}


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 233 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_a7}


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 248 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}
