+extern void log_stack_execution_failure(addr64_t vaddr, vm_prot_t prot);
+extern void log_unnest_badness(vm_map_t, vm_map_offset_t, vm_map_offset_t);
+
+struct proc;
+extern int cs_allow_invalid(struct proc *p);
+extern int cs_invalid_page(addr64_t vaddr);
+extern boolean_t cs_validate_page(void *blobs,
+ memory_object_t pager,
+ memory_object_offset_t offset,
+ const void *data,
+ boolean_t *tainted);
+
+extern kern_return_t mach_memory_entry_purgable_control(
+ ipc_port_t entry_port,
+ vm_purgable_t control,
+ int *state);
+
+extern kern_return_t mach_memory_entry_get_page_counts(
+ ipc_port_t entry_port,
+ unsigned int *resident_page_count,
+ unsigned int *dirty_page_count);
+
+extern kern_return_t mach_memory_entry_page_op(
+ ipc_port_t entry_port,
+ vm_object_offset_t offset,
+ int ops,
+ ppnum_t *phys_entry,
+ int *flags);
+
+extern kern_return_t mach_memory_entry_range_op(
+ ipc_port_t entry_port,
+ vm_object_offset_t offset_beg,
+ vm_object_offset_t offset_end,
+ int ops,
+ int *range);
+
+extern void mach_memory_entry_port_release(ipc_port_t port);
+extern void mach_destroy_memory_entry(ipc_port_t port);
+extern kern_return_t mach_memory_entry_allocate(
+ struct vm_named_entry **user_entry_p,
+ ipc_port_t *user_handle_p);
+
+extern void vm_paging_map_init(void);
+
+extern int macx_backing_store_compaction(int flags);
+extern unsigned int mach_vm_ctl_page_free_wanted(void);
+
+extern int no_paging_space_action(void);
+
+#define VM_TOGGLE_CLEAR 0
+#define VM_TOGGLE_SET 1
+#define VM_TOGGLE_GETVALUE 999
+int vm_toggle_entry_reuse(int, int*);
+
+#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;