wibble  1.1
Public Member Functions | Public Attributes | List of all members
wibble::sys::MMap Struct Reference

Map a file into memory. More...

#include <mmap.h>

Public Member Functions

 MMap ()
 
 MMap (const MMap &mmap)
 
 MMap (const std::string &filename)
 
 ~MMap ()
 
MMapoperator= (const MMap &mmap)
 
void map (const std::string &filename)
 
void unmap ()
 

Public Attributes

std::string filename
 
size_t size
 
int fd
 
const char * buf
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ MMap() [1/3]

wibble::sys::MMap::MMap ( )

◆ MMap() [2/3]

wibble::sys::MMap::MMap ( const MMap mmap)

◆ MMap() [3/3]

wibble::sys::MMap::MMap ( const std::string &  filename)

◆ ~MMap()

wibble::sys::MMap::~MMap ( )

Member Function Documentation

◆ map()

void wibble::sys::MMap::map ( const std::string &  filename)

◆ operator=()

MMap& wibble::sys::MMap::operator= ( const MMap mmap)

◆ unmap()

void wibble::sys::MMap::unmap ( )

Member Data Documentation

◆ buf

const char* wibble::sys::MMap::buf

Referenced by TestMMap::simple().

◆ fd

int wibble::sys::MMap::fd

Referenced by TestMMap::simple().

◆ filename

std::string wibble::sys::MMap::filename

Referenced by TestMMap::simple().

◆ size

size_t wibble::sys::MMap::size

The documentation for this struct was generated from the following file: