+#endif /* MACH_KERNEL_PRIVATE */
+
+/*
+ * VM allocation flags:
+ *
+ * VM_FLAGS_FIXED
+ * (really the absence of VM_FLAGS_ANYWHERE)
+ * Allocate new VM region at the specified virtual address, if possible.
+ *
+ * VM_FLAGS_ANYWHERE
+ * Allocate new VM region anywhere it would fit in the address space.
+ *
+ * VM_FLAGS_PURGABLE
+ * Create a purgable VM object for that new VM region.
+ *
+ * VM_FLAGS_NO_PMAP_CHECK
+ * (for DEBUG kernel config only, ignored for other configs)
+ * Do not check that there is no stale pmap mapping for the new VM region.
+ * This is useful for kernel memory allocations at bootstrap when building
+ * the initial kernel address space while some memory is already in use.
+ *
+ * VM_FLAGS_OVERWRITE
+ * The new VM region can replace existing VM regions if necessary
+ * (to be used in combination with VM_FLAGS_FIXED).
+ *
+ * VM_FLAGS_NO_CACHE
+ * Pages brought in to this VM region are placed on the speculative
+ * queue instead of the active queue. In other words, they are not
+ * cached so that they will be stolen first if memory runs low.
+ */
+#define VM_FLAGS_FIXED 0x0000
+#define VM_FLAGS_ANYWHERE 0x0001
+#define VM_FLAGS_PURGABLE 0x0002
+#define VM_FLAGS_NO_CACHE 0x0010
+#ifdef KERNEL_PRIVATE
+#define VM_FLAGS_BELOW_MIN 0x0080 /* map below the map's min offset */
+#define VM_FLAGS_PERMANENT 0x0100 /* mapping can NEVER be unmapped */
+#define VM_FLAGS_GUARD_AFTER 0x0200 /* guard page after the mapping */
+#define VM_FLAGS_GUARD_BEFORE 0x0400 /* guard page before the mapping */
+#define VM_FLAGS_SUBMAP 0x0800 /* mapping a VM submap */
+#define VM_FLAGS_ALREADY 0x1000 /* OK if same mapping already exists */
+#define VM_FLAGS_BEYOND_MAX 0x2000 /* map beyond the map's max offset */
+#define VM_FLAGS_OVERWRITE 0x4000 /* delete any existing mappings first */
+#define VM_FLAGS_NO_PMAP_CHECK 0x8000 /* do not check that pmap is empty */
+#endif /* KERNEL_PRIVATE */
+
+/*
+ * VM_FLAGS_SUPERPAGE_MASK
+ * 3 bits that specify whether large pages should be used instead of
+ * base pages (!=0), as well as the requested page size.
+ */
+#define VM_FLAGS_SUPERPAGE_MASK 0x70000 /* bits 0x10000, 0x20000, 0x40000 */
+#define VM_FLAGS_SUPERPAGE_SHIFT 16
+
+#define SUPERPAGE_NONE 0 /* no superpages, if all bits are 0 */
+#define VM_FLAGS_SUPERPAGE_NONE (SUPERPAGE_NONE<<VM_FLAGS_SUPERPAGE_SHIFT)
+#if defined(__x86_64__) || !defined(KERNEL)
+#define SUPERPAGE_SIZE_2MB 1
+#define VM_FLAGS_SUPERPAGE_SIZE_2MB (SUPERPAGE_SIZE_2MB<<VM_FLAGS_SUPERPAGE_SHIFT)
+#endif
+