File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -401,8 +401,6 @@ constexpr auto fail = -1;
401401// Never results in unmapped.
402402bool map::flush_ () NOEXCEPT
403403{
404- // msync should not be required on modern linux, see linus et al.
405- // stackoverflow.com/questions/5902629/mmap-msync-and-linux-process-termination
406404#if defined(HAVE_MSC)
407405 // unmap (and therefore msync) must be called before ftruncate.
408406 // "To flush all the dirty pages plus the metadata for the file and ensure
@@ -414,6 +412,8 @@ bool map::flush_() NOEXCEPT
414412 // non-standard macOS behavior: news.ycombinator.com/item?id=30372218
415413 const auto success = ::fcntl (opened_, F_FULLFSYNC, 0 ) != fail;
416414#else
415+ // msync should not be required on modern linux, see linus et al.
416+ // stackoverflow.com/questions/5902629/mmap-msync-and-linux-process-termination
417417 // Linux: fsync "transfers ("flushes") all modified in-core data of
418418 // (i.e., modified buffer cache pages for) the file referred to by the
419419 // file descriptor fd to the disk device so all changed information
You can’t perform that action at this time.
0 commit comments