.TH "KVMAllocator" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KVMAllocator \- KVMAllocator is a virtual memory allocator.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kvmallocator.h>\fP
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "struct \fBKVMAllocator\fP ()"
.br
.ti -1c
.RI "\fB~KVMAllocator\fP ()"
.br
.ti -1c
.RI "Block * \fBallocate\fP (size_t _size)"
.br
.ti -1c
.RI "void \fBfree\fP (Block *block)"
.br
.ti -1c
.RI "bool \fBcopyBlock\fP (void *dest, Block *src, int _offset=0, size_t length=0)"
.br
.ti -1c
.RI "void \fBcopy\fP (void *dest, Block *src, int _offset=0, size_t length=0) KDE_DEPRECATED"
.br
.ti -1c
.RI "bool \fBcopyBlock\fP (Block *dest, void *src, int _offset=0, size_t length=0)"
.br
.ti -1c
.RI "void \fBcopy\fP (Block *dest, void *src, int _offset=0, size_t length=0) KDE_DEPRECATED"
.br
.ti -1c
.RI "void * \fBmap\fP (Block *block)"
.br
.ti -1c
.RI "void \fBunmap\fP (Block *block)"
.br
.in -1c
.SH "Detailed Description"
.PP 
KVMAllocator is a virtual memory allocator. 

Memory is allocated block-wise in a tmp file.
.PP
\fBAuthor:\fP
.RS 4
Waldo Bastian <bastian@kde.org> 
.RE
.PP

.PP
Definition at line 39 of file kvmallocator.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KVMAllocator::KVMAllocator ()"
.PP
Create a KVMAllocator. 
.PP
Definition at line 63 of file kvmallocator.cpp.
.SS "KVMAllocator::~\fBKVMAllocator\fP ()"
.PP
Destruct the KVMAllocator and release all memory. 
.PP
Definition at line 73 of file kvmallocator.cpp.
.SH "Member Function Documentation"
.PP 
.SS "KVMAllocator::Block * KVMAllocator::allocate (size_t _size)"
.PP
Allocate a virtual memory block. 
.PP
\fBParameters:\fP
.RS 4
\fI_size\fP Size in bytes of the memory block. 
.RE
.PP
\fBReturns:\fP
.RS 4
the allocated memory block 
.RE
.PP

.PP
Definition at line 84 of file kvmallocator.cpp.
.PP
References QMap::begin(), QMap::end(), endl(), QMap::replace(), and QMap::size().
.SS "void KVMAllocator::free (Block * block)"
.PP
Free a virtual memory block. 
.PP
\fBParameters:\fP
.RS 4
\fIblock\fP the block to free 
.RE
.PP

.PP
Definition at line 132 of file kvmallocator.cpp.
.PP
References QMap::end(), endl(), QMap::find(), QMap::remove(), and QMap::replace().
.SS "bool KVMAllocator::copyBlock (void * dest, Block * src, int _offset = \fC0\fP, size_t length = \fC0\fP)"
.PP
Copy \fClength\fP bytes from \fC_offset\fP in the virtual memory block \fCsrc\fP to normal memory at address *dest. 
.PP
\fBParameters:\fP
.RS 4
\fIdest\fP the destination of the data 
.br
\fIsrc\fP the source block 
.br
\fI_offset\fP the offset in the source block 
.br
\fIlength\fP the length of the data to copy 
.RE
.PP
\fBReturns:\fP
.RS 4
true on success, false on failure, see errno for details 
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 193 of file kvmallocator.cpp.
.PP
Referenced by copy().
.SS "void KVMAllocator::copy (void * dest, Block * src, int _offset = \fC0\fP, size_t length = \fC0\fP)"
.PP
Copy data from a virtual memory block to normal memory. 
.PP
\fBDeprecated\fP
.RS 4
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcopyBlock\fP 
.RE
.PP

.PP
Definition at line 187 of file kvmallocator.cpp.
.PP
References copyBlock().
.SS "bool KVMAllocator::copyBlock (Block * dest, void * src, int _offset = \fC0\fP, size_t length = \fC0\fP)"
.PP
Copy \fClength\fP bytes from normal memory at address \fCsrc\fP to \fC_offset\fP in the virtual memory block \fCdest\fP. 
.PP
\fBParameters:\fP
.RS 4
\fIdest\fP the block to copy the data to 
.br
\fIsrc\fP the source location of the data 
.br
\fI_offset\fP the offset in the destination block 
.br
\fIlength\fP the length of the data to copy 
.RE
.PP
\fBReturns:\fP
.RS 4
true on success, false on failure, see errno for details 
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 229 of file kvmallocator.cpp.
.SS "void KVMAllocator::copy (Block * dest, void * src, int _offset = \fC0\fP, size_t length = \fC0\fP)"
.PP
Copy data from normal memory to a virtual memory block. 
.PP
\fBDeprecated\fP
.RS 4
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcopyBlock\fP 
.RE
.PP

.PP
Definition at line 223 of file kvmallocator.cpp.
.PP
References copyBlock().
.SS "void * KVMAllocator::map (Block * block)"
.PP
Map a virtual memory block in memory. 
.PP
\fBParameters:\fP
.RS 4
\fIblock\fP the block to map 
.RE
.PP

.PP
Definition at line 253 of file kvmallocator.cpp.
.SS "void KVMAllocator::unmap (Block * block)"
.PP
Unmap a virtual memory block. 
.PP
\fBParameters:\fP
.RS 4
\fIblock\fP the block to unmap 
.RE
.PP

.PP
Definition at line 268 of file kvmallocator.cpp.

.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
