class KVMAllocator

KVMAllocator is a virtual memory allocator. More...

Definition#include <kvmallocator.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Members


Detailed Description

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

 KVMAllocator ()

KVMAllocator

Create a KVMAllocator

 ~KVMAllocator ()

~KVMAllocator

Destruct the KVMAllocator and release all memory.

Block * allocate (size_t _size)

allocate

Allocate a virtual memory block.

Parameters:
_sizeSize in bytes of the memory block.

void  free (Block *block)

free

Free a virtual memory block

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

copy

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

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

copy

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

void * map (Block *block)

map

Map a virtual memory block in memory

void  unmap (Block *block)

unmap

Unmap a virtual memory block