Skip to contentSkip to conversation

ltp/lapi: add some madvices definition

PATCH Superseded Li Wang 1 participant 1 message May 23, 2016

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Li Wang

author
#0 lore raw

PATCH v2 1/3 ltp/lapi: add some madvices definition

---
 include/lapi/mmap.h | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
include/lapi/mmap.h +32 -0
index e8e5917..b121e43 100644
@@ -23,4 +23,36 @@
 #define MAP_HUGETLB 0x40000
 #endif
 
+#ifndef MADV_REMOVE
+#define MADV_REMOVE 9
+#endif
+
+#ifndef MADV_DONTFORK
+#define MADV_DONTFORK 10
+#define MADV_DOFORK   11
+#endif
+
+#ifndef MADV_HWPOISON
+#define MADV_HWPOISON 100
+#endif
+
+#ifndef MADV_SOFT_OFFLINE
+#define MADV_SOFT_OFFLINE 101
+#endif
+
+#ifndef MADV_MERGEABLE
+#define MADV_MERGEABLE   12
+#define MADV_UNMERGEABLE 13
+#endif
+
+#ifndef MADV_HUGEPAGE
+#define MADV_HUGEPAGE   14
+#define MADV_NOHUGEPAGE 15
+#endif
+
+#ifndef MADV_DONTDUMP
+#define MADV_DONTDUMP 16
+#define MADV_DODUMP   17
+#endif
+
 #endif /* __LAPI_MMAP_H__ */
Signature · 1 line
1.8.3.1