From b850211b54a2e3073ec9fe38ce35222ce4eedfb9 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Wed, 4 Jan 2023 15:12:29 +0000 Subject: Only for linux. --- vespalib/src/vespa/vespalib/util/mmap_file_allocator.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vespalib') diff --git a/vespalib/src/vespa/vespalib/util/mmap_file_allocator.cpp b/vespalib/src/vespa/vespalib/util/mmap_file_allocator.cpp index 6dd2a853e51..8c89f6745e4 100644 --- a/vespalib/src/vespa/vespalib/util/mmap_file_allocator.cpp +++ b/vespalib/src/vespa/vespalib/util/mmap_file_allocator.cpp @@ -62,8 +62,10 @@ MmapFileAllocator::alloc(size_t sz) const assert(ins_res.second); int retval = madvise(buf, sz, MADV_RANDOM); assert(retval == 0); +#ifdef __linux__ retval = madvise(buf, sz, MADV_DONTDUMP); assert(retval == 0); +#endif return PtrAndSize(buf, sz); } -- cgit v1.2.3