Blackberry/BSDs: Don't sync memory back to the underlying file. This is terrible on I/O performance. Linux already has this by default. See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21820

This commit is contained in:
Sacha 2013-12-10 23:23:47 +10:00
parent bdaa6f335f
commit 6b8d4cfe7b

View File

@ -175,6 +175,12 @@ void *MemArena::CreateView(s64 offset, size_t size, void *base)
return ptr;
#else
void *retval = mmap(base, size, PROT_READ | PROT_WRITE, MAP_SHARED |
// Do not sync memory to underlying file. Linux has this by default.
#ifdef BLACKBERRY
MAP_NOSYNCFILE |
#elif defined(__FreeBSD__)
MAP_NOSYNC |
#endif
((base == 0) ? 0 : MAP_FIXED), fd, offset);
if (retval == MAP_FAILED)