Class MemoryMapBuilder
Defined in File memory_map.hpp
Class Documentation
-
class MemoryMapBuilder
The builder of a MemoryMap object.
Public Functions
-
cxx::expected<MemoryMap, MemoryMapError> create() noexcept
The base address suggestion to which the memory should be mapped. But there is no guarantee that it is really mapped at this position. One has to verify with .getBaseAddress if the hint was accepted. Setting it to nullptr means no suggestion.
The length of the memory which should be mapped
The file descriptor which should be mapped into process space
Defines if the memory should be mapped read only or with write access. A read only memory section will cause a segmentation fault when written to.
Sets the flags defining how the mapped data should be handled
Offset of the memory location
creates a valid MemoryMap object. If the construction failed the expected contains an enum value describing the error.
- Returns:
expected containing MemoryMap on success otherwise MemoryMapError
-
cxx::expected<MemoryMap, MemoryMapError> create() noexcept