+
+#define SWAP_WRITE 0x00000000 /* Write buffer (pseudo flag). */
+#define SWAP_READ 0x00000001 /* Read buffer. */
+#define SWAP_ASYNC 0x00000002 /* Start I/O, do not wait. */
+
+extern void vm_compressor_pager_init(void);
+extern kern_return_t compressor_memory_object_create(
+ memory_object_size_t,
+ memory_object_t *);
+
+#if CONFIG_JETSAM
+extern int proc_get_memstat_priority(struct proc*, boolean_t);
+#endif /* CONFIG_JETSAM */
+
+/* the object purger. purges the next eligible object from memory. */
+/* returns TRUE if an object was purged, otherwise FALSE. */
+boolean_t vm_purgeable_object_purge_one_unlocked(int force_purge_below_group);
+void vm_purgeable_disown(task_t task);
+
+struct trim_list {
+ uint64_t tl_offset;
+ uint64_t tl_length;
+ struct trim_list *tl_next;
+};
+
+u_int32_t vnode_trim_list(struct vnode *vp, struct trim_list *tl, boolean_t route_only);
+
+#define MAX_SWAPFILENAME_LEN 1024
+#define SWAPFILENAME_INDEX_LEN 2 /* Doesn't include the terminating NULL character */
+
+extern char swapfilename[MAX_SWAPFILENAME_LEN + 1];
+
+struct vm_counters {
+ unsigned int do_collapse_compressor;
+ unsigned int do_collapse_compressor_pages;
+ unsigned int do_collapse_terminate;
+ unsigned int do_collapse_terminate_failure;
+ unsigned int should_cow_but_wired;
+ unsigned int create_upl_extra_cow;
+ unsigned int create_upl_extra_cow_pages;
+ unsigned int create_upl_lookup_failure_write;
+ unsigned int create_upl_lookup_failure_copy;
+};
+extern struct vm_counters vm_counters;
+