|
Lunchbox
1.6.0
|
Helper to map a file to a memory address (mmap) More...
#include <memoryMap.h>
Inheritance diagram for lunchbox::MemoryMap:
Collaboration diagram for lunchbox::MemoryMap:Public Member Functions | |
| MemoryMap () | |
| Construct a new memory map. | |
| ~MemoryMap () | |
| Destruct the memory map. | |
| const void * | map (const std::string &fileName) |
| Map a file to a memory address. | |
| void | unmap () |
| Unmap the file. | |
| const void * | getAddress () const |
| size_t | getSize () const |
Helper to map a file to a memory address (mmap)
Definition at line 29 of file memoryMap.h.
Construct a new memory map.
| const void* lunchbox::MemoryMap::getAddress | ( | ) | const [inline] |
| size_t lunchbox::MemoryMap::getSize | ( | ) | const [inline] |
| const void* lunchbox::MemoryMap::map | ( | const std::string & | fileName | ) |
Map a file to a memory address.
Currently the file is only mapped read-only. The file is automatically unmapped when the memory map is deleted.
| fileName | The filename of the file to map. |
| void lunchbox::MemoryMap::unmap | ( | ) |
Unmap the file.
1.7.6.1