|
void * | map (off_t offset, size_t size) |
|
void | unmap () |
|
|
template<typename T > |
static int | read (off_t offset, T &value) |
|
template<typename T > |
static int | write (off_t offset, const T &value) |
|
void* Mmap::map |
( |
off_t |
offset, |
|
|
size_t |
size |
|
) |
| |
Map a portion of memory.
- Parameters
-
offset | the memory offset to start the mapping at. There are no alignment requirements. |
size | how many bytes to map. |
- Returns
- a pointer to the requested memory, or nullptr on failure.
Discard the existing mapping. This is called automatically by the destructor or when calling map().
template<typename T >
static int Mmap::read |
( |
off_t |
offset, |
|
|
T & |
value |
|
) |
| |
|
inlinestatic |
Read the content of the memory at offset
into value
.
template<typename T >
static int Mmap::write |
( |
off_t |
offset, |
|
|
const T & |
value |
|
) |
| |
|
inlinestatic |
Write the content of value
into the memory at offser
.
The documentation for this class was generated from the following file: