3#include "imr/util/file_descriptor.h"
11
12
13
21
22
23
24
25
26 std::filesystem::path path;
28
29
30
31
48 std::span<
const char>
as_span()
const noexcept;
52 std::size_t length_{0};
53 void* mapped_file_{
nullptr};
55 void cleanup()
noexcept;
RAII file descriptor wrapper.
Definition file_descriptor.h:19
RAII mmap file.
Definition memory_mapped_file.h:15
MemoryMappedFile & operator=(MemoryMappedFile &&other) noexcept
MemoryMappedFile(const MemoryMappedFile &)=delete
MemoryMappedFile(const Config &cfg)
MemoryMappedFile(MemoryMappedFile &&other) noexcept
std::span< const char > as_span() const noexcept
MemoryMappedFile & operator=(const MemoryMappedFile &)=delete
Definition file_descriptor.h:11
Definition memory_mapped_file.h:19
int mmap_flags
Additional mmap() flags, OR'd with MAP_PRIVATE.
Definition memory_mapped_file.h:32
int madvise_flags
Flags passed to madvise() after mapping. Pass 0 to skip madvise() call entirely.
Definition memory_mapped_file.h:34