• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

KDECore

KVMAllocator Class Reference

KVMAllocator is a virtual memory allocator. More...

#include <kvmallocator.h>

List of all members.


Public Member Functions

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

Detailed Description

KVMAllocator is a virtual memory allocator.

Memory is allocated block-wise in a tmp file.

Author:
Waldo Bastian <bastian@kde.org>

Definition at line 39 of file kvmallocator.h.


Constructor & Destructor Documentation

KVMAllocator::KVMAllocator (  ) 

Create a KVMAllocator.

Definition at line 63 of file kvmallocator.cpp.

KVMAllocator::~KVMAllocator (  ) 

Destruct the KVMAllocator and release all memory.

Definition at line 73 of file kvmallocator.cpp.


Member Function Documentation

KVMAllocator::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
Parameters:
_size Size in bytes of the memory block.

Definition at line 84 of file kvmallocator.cpp.

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

Copy data from normal memory to a virtual memory block.

Deprecated:
See also:
copyBlock

Definition at line 223 of file kvmallocator.cpp.

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

Copy data from a virtual memory block to normal memory.

Deprecated:
See also:
copyBlock

Definition at line 187 of file kvmallocator.cpp.

bool KVMAllocator::copyBlock ( 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
Returns:
true on success, false on failure, see errno for details
Since:
3.2

Definition at line 229 of file kvmallocator.cpp.

bool KVMAllocator::copyBlock ( 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
Returns:
true on success, false on failure, see errno for details
Since:
3.2

Definition at line 193 of file kvmallocator.cpp.

void KVMAllocator::free ( Block *  block  ) 

Free a virtual memory block.

Parameters:
block the block to free

Definition at line 132 of file kvmallocator.cpp.

void * KVMAllocator::map ( Block *  block  ) 

Map a virtual memory block in memory.

Parameters:
block the block to map

Definition at line 253 of file kvmallocator.cpp.

void KVMAllocator::unmap ( Block *  block  ) 

Unmap a virtual memory block.

Parameters:
block the block to unmap

Definition at line 268 of file kvmallocator.cpp.


The documentation for this class was generated from the following files:
  • kvmallocator.h
  • kvmallocator.cpp

KDECore

Skip menu "KDECore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal