20 #include <sys/types.h> 166 size_t mapped_length;
168 bool useMemoryMapFlag;
179 void constructor_clear();
181 void destructor_clear();
183 virtual bool allocate();
190 virtual bool open(
const char * file,
int flags = O_RDONLY);
198 virtual bool create(
const char * file,
size_t size);
207 virtual bool create(
size_t size);
213 return mapped_length;
216 char operator[](
unsigned int index)
218 return ((
char *)data)[index];
227 void useMemoryMap(
bool flag=
true)
229 useMemoryMapFlag = flag;
There are a pair of related data structures in the operating system, and also a few simple algorithms...
virtual bool open(const char *file, int flags=O_RDONLY)
open a previously created mapped vector
virtual bool create(const char *file, size_t size)
create the memory mapped file on disk