Fixed memory mapping incompatibility
This commit is contained in:
parent
46e6eac1bf
commit
7e39029811
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user