diff --git a/src/pinnable_mapped_file.cpp b/src/pinnable_mapped_file.cpp index a78cc6a..06a2ea1 100644 --- a/src/pinnable_mapped_file.cpp +++ b/src/pinnable_mapped_file.cpp @@ -224,7 +224,7 @@ pinnable_mapped_file::pinnable_mapped_file(const std::filesystem::path& dir, boo } std::byte* start = (std::byte*)_segment_manager; assert(_segment_manager_map.find(start) == _segment_manager_map.end()); - _segment_manager_map[start] = start + _database_size; + _segment_manager_map[start] = start + _segment_manager->get_size(); } void pinnable_mapped_file::setup_copy_on_write_mapping() {