Fixed memory mapping incompatibility

This commit is contained in:
Andrea Cavalli 2020-08-23 21:17:32 +02:00
parent 46e6eac1bf
commit 7e39029811

View File

@ -84,7 +84,7 @@ Result<MemoryMapping> MemoryMapping::create_from_file(const FileFd &file_fd, con
auto data_offset = begin - fixed_begin;
TRY_RESULT(data_size, narrow_cast_safe<size_t>(end - fixed_begin));
void *data = mmap(nullptr, data_size, PROT_READ, MADV_MERGEABLE, fd, narrow_cast<off_t>(fixed_begin));
void *data = mmap(nullptr, data_size, PROT_READ, MAP_PRIVATE, fd, narrow_cast<off_t>(fixed_begin));
if (data == MAP_FAILED) {
return OS_ERROR("mmap call failed");
}