From 70cd7a94ec68a555a985f1366eca229ac1324a04 Mon Sep 17 00:00:00 2001 From: Michael Krasnyk Date: Sun, 1 May 2016 19:11:06 +0200 Subject: [PATCH] Fix memory mapping "Invalid argument" exception. --- include/util/static_rtree.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/util/static_rtree.hpp b/include/util/static_rtree.hpp index 7e4032591..bd4c80c8a 100644 --- a/include/util/static_rtree.hpp +++ b/include/util/static_rtree.hpp @@ -201,6 +201,8 @@ class StaticRTree leaf_node_file.write((char *)¤t_leaf, sizeof(current_leaf)); processed_objects_count += current_leaf.object_count; } + leaf_node_file.flush(); + leaf_node_file.close(); std::uint32_t processing_level = 0; while (1 < tree_nodes_in_level.size())