Function utility::map_file¶
- Defined in File mmap.hpp
Function Documentation¶
-
void *
utility
::
map_file
(void *const addr, const size_t length, const int protection, const int flags, const int fd, const off_t offset)¶ Maps a file checking errors.
- Return
- On success, returns a pointer to the mapped area. On error, nullptr is returned.
- Parameters
addr
: Same as mmap(2)length
: Same as mmap(2)protection
: Same as mmap(2)flags
: Same as mmap(2)fd
: Same as mmap(2)offset
: Same as mmap(2)