wibble
1.1
|
Map a file into memory. More...
#include <mmap.h>
Public Member Functions | |
MMap () | |
MMap (const MMap &mmap) | |
MMap (const std::string &filename) | |
~MMap () | |
MMap & | operator= (const MMap &mmap) |
void | map (const std::string &filename) |
void | unmap () |
Public Attributes | |
std::string | filename |
size_t | size |
int | fd |
const char * | buf |
Map a file into memory.
Currently, this is only read-only.
Copy semanthics are the same as auto_ptr
Note: on 32bit systems, it is not possible to map files larger than 2G into memory.
wibble::sys::MMap::MMap | ( | ) |
wibble::sys::MMap::MMap | ( | const MMap & | mmap | ) |
wibble::sys::MMap::MMap | ( | const std::string & | filename | ) |
wibble::sys::MMap::~MMap | ( | ) |
void wibble::sys::MMap::map | ( | const std::string & | filename | ) |
Referenced by TestMMapV2::read(), and TestMMap::simple().
void wibble::sys::MMap::unmap | ( | ) |
Referenced by TestMMapV2::read(), and TestMMap::simple().
const char* wibble::sys::MMap::buf |
Referenced by TestMMap::simple().
int wibble::sys::MMap::fd |
Referenced by TestMMap::simple().
std::string wibble::sys::MMap::filename |
Referenced by TestMMap::simple().
size_t wibble::sys::MMap::size |
Referenced by TestMMapV2::read(), and TestMMap::simple().