+extern kern_return_t mach_vm_pressure_monitor(
+ boolean_t wait_for_pressure,
+ unsigned int nsecs_monitored,
+ unsigned int *pages_reclaimed_p,
+ unsigned int *pages_wanted_p);
+
+extern kern_return_t
+vm_set_buffer_cleanup_callout(
+ boolean_t (*func)(int));
+
+struct vm_page_stats_reusable {
+ SInt32 reusable_count;
+ uint64_t reusable;
+ uint64_t reused;
+ uint64_t reused_wire;
+ uint64_t reused_remove;
+ uint64_t all_reusable_calls;
+ uint64_t partial_reusable_calls;
+ uint64_t all_reuse_calls;
+ uint64_t partial_reuse_calls;
+ uint64_t reusable_pages_success;
+ uint64_t reusable_pages_failure;
+ uint64_t reusable_pages_shared;
+ uint64_t reuse_pages_success;
+ uint64_t reuse_pages_failure;
+ uint64_t can_reuse_success;
+ uint64_t can_reuse_failure;
+ uint64_t reusable_reclaimed;
+};
+extern struct vm_page_stats_reusable vm_page_stats_reusable;
+
+extern int hibernate_flush_memory(void);
+extern void hibernate_reset_stats(void);
+extern void hibernate_create_paddr_map(void);
+
+extern int vm_compressor_mode;
+extern int vm_compressor_thread_count;
+
+#define VM_PAGER_DEFAULT 0x1 /* Use default pager. */
+#define VM_PAGER_COMPRESSOR_NO_SWAP 0x2 /* In-core compressor only. */
+#define VM_PAGER_COMPRESSOR_WITH_SWAP 0x4 /* In-core compressor + swap backend. */
+#define VM_PAGER_FREEZER_DEFAULT 0x8 /* Freezer backed by default pager.*/
+#define VM_PAGER_FREEZER_COMPRESSOR_NO_SWAP 0x10 /* Freezer backed by in-core compressor only i.e. frozen data remain in-core compressed.*/
+#define VM_PAGER_FREEZER_COMPRESSOR_WITH_SWAP 0x20 /* Freezer backed by in-core compressor with swap support too.*/
+
+#define VM_PAGER_MAX_MODES 6 /* Total number of vm compressor modes supported */
+
+#define DEFAULT_PAGER_IS_ACTIVE ((vm_compressor_mode & VM_PAGER_DEFAULT) == VM_PAGER_DEFAULT)
+
+#define COMPRESSED_PAGER_IS_ACTIVE (vm_compressor_mode & (VM_PAGER_COMPRESSOR_NO_SWAP | VM_PAGER_COMPRESSOR_WITH_SWAP))
+
+#define DEFAULT_FREEZER_IS_ACTIVE ((vm_compressor_mode & VM_PAGER_FREEZER_DEFAULT) == VM_PAGER_FREEZER_DEFAULT)
+
+#define DEFAULT_FREEZER_COMPRESSED_PAGER_IS_ACTIVE (vm_compressor_mode & (VM_PAGER_FREEZER_COMPRESSOR_NO_SWAP | VM_PAGER_FREEZER_COMPRESSOR_WITH_SWAP))
+#define DEFAULT_FREEZER_COMPRESSED_PAGER_IS_SWAPLESS ((vm_compressor_mode & VM_PAGER_FREEZER_COMPRESSOR_NO_SWAP) == VM_PAGER_FREEZER_COMPRESSOR_NO_SWAP)
+#define DEFAULT_FREEZER_COMPRESSED_PAGER_IS_SWAPBACKED ((vm_compressor_mode & VM_PAGER_FREEZER_COMPRESSOR_WITH_SWAP) == VM_PAGER_FREEZER_COMPRESSOR_WITH_SWAP)
+
+