diff --git a/generator/osm_source.cpp b/generator/osm_source.cpp index 920b705..b0d216c 100644 --- a/generator/osm_source.cpp +++ b/generator/osm_source.cpp @@ -23,6 +23,8 @@ #include #include +#include + #include "defines.hpp" using namespace std; @@ -251,6 +253,7 @@ void BuildIntermediateDataFromO5M( auto sourceMap = boost::iostreams::mapped_file_source{filename}; if (!sourceMap.is_open()) MYTHROW(Writer::OpenException, ("Failed to open", filename)); + ::madvise(const_cast(sourceMap.data()), sourceMap.size(), MADV_SEQUENTIAL); constexpr size_t chunkSize = 10'000; std::vector threads;