diff options
Diffstat (limited to 'src/support/lockedpool.cpp')
-rw-r--r-- | src/support/lockedpool.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/support/lockedpool.cpp b/src/support/lockedpool.cpp index 070b3ed80e..fc1f660aec 100644 --- a/src/support/lockedpool.cpp +++ b/src/support/lockedpool.cpp @@ -250,6 +250,9 @@ void *PosixLockedPageAllocator::AllocateLocked(size_t len, bool *lockingSuccess) addr = mmap(nullptr, len, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); if (addr) { *lockingSuccess = mlock(addr, len) == 0; +#ifdef MADV_DONTDUMP + madvise(addr, len, MADV_DONTDUMP); +#endif } return addr; } |