Function utility::map_file_write_mode¶
- Defined in File mmap.hpp
Function Documentation¶
-
std::pair<int, void *>
utility
::
map_file_write_mode
(const std::string &file_name, void *const addr, const size_t length, const off_t offset, const int additional_flags = 0)¶ Maps a file with write mode.
- Return
- On Success, returns a pair of the file descriptor of the file and the starting address for the map. On error, retuns a pair of -1 and nullptr.
- Parameters
file_name
: The name of a file to be mappedaddr
: Normally nullptr; if this is not nullptr the kernel takes it as a hint about where to place the mappinglength
: The length of the mapoffset
: The offset in the file