From 90be7e420418ef143f69e44ec6f3d4504464e94b Mon Sep 17 00:00:00 2001 From: Dusty DeWeese Date: Thu, 11 Jun 2020 09:38:18 -0700 Subject: [PATCH] remove MAP_POPULATE Signed-off-by: Dusty DeWeese --- lib/memory_mapped_file.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/memory_mapped_file.cc b/lib/memory_mapped_file.cc index 1b5204d8..0600c9b2 100644 --- a/lib/memory_mapped_file.cc +++ b/lib/memory_mapped_file.cc @@ -38,8 +38,8 @@ std::unique_ptr 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