Skip to content

Commit

Permalink
Add MAP_POPULATE for Lin mmap
Browse files Browse the repository at this point in the history
  • Loading branch information
vurusovs committed Apr 16, 2024
1 parent 58e1c38 commit 999d6d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/util/src/os/lin/lin_mmap_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class MapHolder : public MappedMemory {
}
m_size = sb.st_size;
if (m_size > 0) {
m_data = mmap(nullptr, m_size, prot, MAP_PRIVATE, m_handle.get(), 0);
m_data = mmap(nullptr, m_size, prot, MAP_PRIVATE | MAP_POPULATE, m_handle.get(), 0);
if (m_data == MAP_FAILED) {
throw std::runtime_error("Can not create file mapping for " + path + ", err=" + std::strerror(errno));
}
Expand Down

0 comments on commit 999d6d3

Please sign in to comment.