The unified diff between revisions [8ef9c5a3..] and [6f1527db..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'modules/alloc_mmap/mmap_mem.cpp'
#
#
# patch "modules/alloc_mmap/mmap_mem.cpp"
# from [a7da0ab7a6cd699e92c61878f3305fdefea5ff4e]
# to [a2a417e668879424824b5718530638a1720f3d86]
#
============================================================
--- modules/alloc_mmap/mmap_mem.cpp a7da0ab7a6cd699e92c61878f3305fdefea5ff4e
+++ modules/alloc_mmap/mmap_mem.cpp a2a417e668879424824b5718530638a1720f3d86
@@ -87,7 +87,13 @@ void* MemoryMapping_Allocator::alloc_blo
if(::write(file.get_fd(), "\0", 1) != 1)
throw MemoryMapping_Failed("Could not write to file");
- void* ptr = ::mmap(0, n, PROT_READ | PROT_WRITE, MAP_SHARED,
+ int flags = MAP_SHARED;
+
+#ifdef MAP_NOSYNC
+ flags |= MAP_NOSYNC;
+#endif
+
+ void* ptr = ::mmap(0, n, PROT_READ | PROT_WRITE, flags,
file.get_fd(), 0);
if(ptr == static_cast<void*>(MAP_FAILED))