summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/sys/mman.h
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/sys/mman.h')
-rw-r--r--freebsd/sys/sys/mman.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/freebsd/sys/sys/mman.h b/freebsd/sys/sys/mman.h
index 5ed9cdd6..c79ad86d 100644
--- a/freebsd/sys/sys/mman.h
+++ b/freebsd/sys/sys/mman.h
@@ -91,6 +91,17 @@
*/
#define MAP_NOCORE 0x00020000 /* dont include these pages in a coredump */
#define MAP_PREFAULT_READ 0x00040000 /* prefault mapping for reading */
+
+/*
+ * Request specific alignment (n == log2 of the desired alignment).
+ *
+ * MAP_ALIGNED_SUPER requests optimal superpage alignment, but does
+ * not enforce a specific alignment.
+ */
+#define MAP_ALIGNED(n) ((n) << MAP_ALIGNMENT_SHIFT)
+#define MAP_ALIGNMENT_SHIFT 24
+#define MAP_ALIGNMENT_MASK MAP_ALIGNED(0xff)
+#define MAP_ALIGNED_SUPER MAP_ALIGNED(1) /* align on a superpage */
#endif /* __BSD_VISIBLE */
#if __POSIX_VISIBLE >= 199309