remove MAP_POPULATE

Signed-off-by: Dusty DeWeese <dustin.deweese@gmail.com>
This commit is contained in:
Dusty DeWeese 2020-06-11 09:38:18 -07:00
parent 8f73f7899c
commit 90be7e4204
1 changed files with 2 additions and 2 deletions

View File

@ -38,8 +38,8 @@ std::unique_ptr<MemoryMappedFile> MemoryMappedFile::InitWithFile(
new MemoryMappedFile(nullptr, 0));
}
void* file_map = mmap(NULL, statbuf.st_size, PROT_READ,
MAP_PRIVATE | MAP_POPULATE, fd, 0);
void* file_map =
mmap(NULL, statbuf.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
// If mmap() succeeded, the fd is no longer needed as the mapping will
// keep the file open. If mmap() failed, the fd needs to be closed