From a19aa8c771cccf2b9df628ad5db334d9505a025c Mon Sep 17 00:00:00 2001
From: Alexandr <alexandrmruchok@gmail.com>
Date: Tue, 5 Nov 2019 10:29:58 +0200
Subject: [PATCH] [+] POSIX_MADV_DONTNEED definition for POSIX

---
 src/rpmalloc/rpmalloc.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/rpmalloc/rpmalloc.h b/src/rpmalloc/rpmalloc.h
index 2f48bc9..bfbdca2 100644
--- a/src/rpmalloc/rpmalloc.h
+++ b/src/rpmalloc/rpmalloc.h
@@ -53,6 +53,11 @@ extern "C" {
 //! Flag to rpaligned_realloc to not preserve content in reallocation
 #define RPMALLOC_NO_PRESERVE    1
 
+//redefinition from mman-linux.h For POSIX
+#ifndef POSIX_MADV_DONTNEED
+#define POSIX_MADV_DONTNEED 4/* Don't need these pages.  */
+#endif
+
 typedef struct rpmalloc_global_statistics_t {
 	//! Current amount of virtual memory mapped, all of which might not have been committed (only if ENABLE_STATISTICS=1)
 	size_t mapped;
-- 
GitLab