Skip to content

Commit

Permalink
Added a documentation link.
Browse files Browse the repository at this point in the history
  • Loading branch information
psiha committed Jun 25, 2024
1 parent 15670a0 commit 95e0ab7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mapped_view/mapped_view.posix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() );
Expand Down

0 comments on commit 95e0ab7

Please sign in to comment.