From 95e0ab7f95874de4d256208d7eacd1908be836c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domagoj=20=C5=A0ari=C4=87?= Date: Tue, 25 Jun 2024 22:45:17 +0200 Subject: [PATCH] Added a documentation link. --- src/mapped_view/mapped_view.posix.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mapped_view/mapped_view.posix.cpp b/src/mapped_view/mapped_view.posix.cpp index 8b28ff0..6f7d658 100644 --- a/src/mapped_view/mapped_view.posix.cpp +++ b/src/mapped_view/mapped_view.posix.cpp @@ -135,6 +135,8 @@ namespace { __attribute__(( nothrow )) void call_msync( mapped_span const range, int const flags ) { BOOST_ASSERT( is_aligned( range.data(), page_size ) ); + // It is OK (efficiency-wise) to call msync on the entire file regardless of how small the change is + // https://stackoverflow.com/questions/68832263/does-msync-performance-depend-on-the-size-of-the-provided-range // EINVAL on OSX for empty range // https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/msync.2.html BOOST_VERIFY( ::msync( range.data(), range.size(), flags ) == 0 || range.empty() );