|
| 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) |
◆ map()
| 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.
◆ unmap()
Discard the existing mapping. This is called automatically by the destructor or when calling map().
◆ read()
template<typename T>
| int Mmap::read |
( |
off_t | offset, |
|
|
T & | value ) |
|
inlinestatic |
Read the content of the memory at offset into value.
◆ write()
template<typename T>
| 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: