Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

KVMAllocator Class Reference

#include <kvmallocator.h>

List of all members.

Public Methods

 KVMAllocator ()
 ~KVMAllocator ()
Block * allocate (size_t _size)
void free (Block *block)
void copy (void *dest, Block *src, int _offset=0, size_t length=0)
void copy (Block *dest, void *src, int _offset=0, size_t length=0)
void * map (Block *block)
void unmap (Block *block)


Detailed Description

KVMAllocator is a virtual memory allocator. Memory is allocated block-wise in a tmp file.

Author:
Waldo Bastian <bastian@kde.org>
Version:
Id:
kvmallocator.h,v 1.5 2002/09/14 17:15:10 tjansen Exp

Definition at line 39 of file kvmallocator.h.


Constructor & Destructor Documentation

KVMAllocator::KVMAllocator  
 

Create a KVMAllocator

KVMAllocator::~KVMAllocator  
 

Destruct the KVMAllocator and release all memory.


Member Function Documentation

Block* KVMAllocator::allocate size_t    _size
 

Allocate a virtual memory block.

Parameters:
_size  Size in bytes of the memory block.
Returns:
the allocated memory block

void KVMAllocator::copy Block *    dest,
void *    src,
int    _offset = 0,
size_t    length = 0
 

Copy length bytes from normal memory at address src to _offset in the virtual memory block dest.

Parameters:
dest  the block to copy the data to
src  the source location of the data
_offset  the offset in the destination block
length  the length of the data to copy

void KVMAllocator::copy void *    dest,
Block *    src,
int    _offset = 0,
size_t    length = 0
 

Copy length bytes from _offset in the virtual memory block src to normal memory at address *dest.

Parameters:
dest  the destination of the data
src  the source block
_offset  the offset in the source block
length  the length of the data to copy

void KVMAllocator::free Block *    block
 

Free a virtual memory block.

Parameters:
block  the block to free

void* KVMAllocator::map Block *    block
 

Map a virtual memory block in memory

Parameters:
block  the block to map

void KVMAllocator::unmap Block *    block
 

Unmap a virtual memory block

Parameters:
block  the block to unmap


The documentation for this class was generated from the following file:
Generated on Wed Aug 13 23:30:28 2003 for kdelibs by doxygen1.2.18