KDECore
kvmallocator.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef KVMALLOCATOR_H
00026 #define KVMALLOCATOR_H
00027
00028 #include <sys/types.h>
00029 #include "kdelibs_export.h"
00030
00031 class KVMAllocatorPrivate;
00032
00039 class KDECORE_EXPORT KVMAllocator
00040 {
00041 public:
00042 struct Block;
00043
00047 KVMAllocator();
00048
00052 ~KVMAllocator();
00053
00059 Block *allocate(size_t _size);
00060
00065 void free(Block *block);
00066
00077 bool copyBlock(void *dest, Block *src, int _offset = 0, size_t length = 0);
00078
00083 void copy(void *dest, Block *src, int _offset = 0, size_t length = 0) KDE_DEPRECATED;
00084
00095 bool copyBlock(Block *dest, void *src, int _offset = 0, size_t length = 0);
00096
00101 void copy(Block *dest, void *src, int _offset = 0, size_t length = 0) KDE_DEPRECATED;
00102
00107 void *map(Block *block);
00108
00113 void unmap(Block *block);
00114
00115 private:
00116 KVMAllocatorPrivate *d;
00117 };
00118
00119 #endif