Rudiments: /home/dmuse/src/rudiments/include/rudiments/memorymap.h Source File

Rudiments

- Main Page
- Classes

memorymap.h
1 // Copyright (c) 2004 David Muse
2 // See the COPYING file for more information.
3
4 #ifndef RUDIMENTS_MEMORYMAP_H
5 #define RUDIMENTS_MEMORYMAP_H
6
7 #include <rudiments/private/memorymapincludes.h>
8
9 class memorymapprivate;
10
13 class RUDIMENTS_DLLSPEC memorymap {
14 public:
15
17 memorymap();
18
21 ~memorymap();
22
58 bool attach(int32_t fd, off64_t offset, size_t len,
59 int32_t protection, int32_t flags);
60
64 bool detach();
65
68 bool setProtection(int32_t protection);
69
86 bool setProtection(off64_t offset, size_t len,
87 int32_t protection);
88
91 void *getData();
92
95 size_t getLength();
96
110 bool sync(bool immediate, bool invalidate);
111
126 bool sync(off64_t offset, size_t len,
127 bool immediate, bool invalidate);
128
129
139 bool sequentialAccess(off64_t offset, size_t len);
140
150 bool randomAccess(off64_t offset, size_t len);
151
161 bool willNeed(off64_t offset, size_t len);
162
172 bool wontNeed(off64_t offset, size_t len);
173
183 bool normalAccess(off64_t offset, size_t len);
184
190 bool lock();
191
198 bool lock(off64_t offset, size_t len);
199
205 bool unlock();
206
213 bool unlock(off64_t offset, size_t len);
214
222 bool inMemory();
223
232 bool inMemory(off64_t offset, size_t len);
233
234
243 static bool lockAll();
244
253 static bool lockAllCurrent();
254
263 static bool lockAllFuture();
264
271 static bool unlockAll();
272
273 #include <rudiments/private/memorymap.h>
274 };
275
276 #endif
memorymap
Definition: memorymap.h:13