• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

Public Member Functions | List of all members
KVMAllocator Class Reference

#include <kvmallocator.h>

Public Member Functions

 KVMAllocator ()
 
 ~KVMAllocator ()
 
Block * allocate (size_t _size)
 
void free (Block *block)
 
bool copyBlock (void *dest, Block *src, int _offset=0, size_t length=0)
 
void copy (void *dest, Block *src, int _offset=0, size_t length=0) TDE_DEPRECATED
 
bool copyBlock (Block *dest, void *src, int _offset=0, size_t length=0)
 
void copy (Block *dest, void *src, int _offset=0, size_t length=0) TDE_DEPRECATED
 
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 basti.nosp@m.an@k.nosp@m.de.or.nosp@m.g

Definition at line 39 of file kvmallocator.h.

Constructor & Destructor Documentation

◆ KVMAllocator()

KVMAllocator::KVMAllocator ( )

Create a KVMAllocator.

Definition at line 63 of file kvmallocator.cpp.

◆ ~KVMAllocator()

KVMAllocator::~KVMAllocator ( )

Destruct the KVMAllocator and release all memory.

Definition at line 73 of file kvmallocator.cpp.

Member Function Documentation

◆ allocate()

KVMAllocator::Block * KVMAllocator::allocate ( size_t  _size)

Allocate a virtual memory block.

Parameters
_sizeSize in bytes of the memory block.
Returns
the allocated memory block
Parameters
_sizeSize in bytes of the memory block.

Definition at line 84 of file kvmallocator.cpp.

◆ copy() [1/2]

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.

◆ copy() [2/2]

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.

◆ copyBlock() [1/2]

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
destthe block to copy the data to
srcthe source location of the data
_offsetthe offset in the destination block
lengththe 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.

◆ copyBlock() [2/2]

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
destthe destination of the data
srcthe source block
_offsetthe offset in the source block
lengththe 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.

◆ free()

void KVMAllocator::free ( Block *  block)

Free a virtual memory block.

Parameters
blockthe block to free

Definition at line 132 of file kvmallocator.cpp.

◆ map()

void * KVMAllocator::map ( Block *  block)

Map a virtual memory block in memory.

Parameters
blockthe block to map

Definition at line 253 of file kvmallocator.cpp.

◆ unmap()

void KVMAllocator::unmap ( Block *  block)

Unmap a virtual memory block.

Parameters
blockthe 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

tdecore

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

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.