Skip to content

Commit a9e3dae

Browse files
committed
Comments.
1 parent 711262c commit a9e3dae

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/memory/map.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,6 @@ constexpr auto fail = -1;
401401
// Never results in unmapped.
402402
bool 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

0 commit comments

Comments
 (0)