+/* Place a copy into a map */
+extern kern_return_t vm_map_copyout(
+ vm_map_t dst_map,
+ vm_map_address_t *dst_addr, /* OUT */
+ vm_map_copy_t copy);
+
+extern kern_return_t vm_map_copyout_size(
+ vm_map_t dst_map,
+ vm_map_address_t *dst_addr, /* OUT */
+ vm_map_copy_t copy,
+ vm_map_size_t copy_size);
+
+extern kern_return_t vm_map_copyout_internal(
+ vm_map_t dst_map,
+ vm_map_address_t *dst_addr, /* OUT */
+ vm_map_copy_t copy,
+ vm_map_size_t copy_size,
+ boolean_t consume_on_success,
+ vm_prot_t cur_protection,
+ vm_prot_t max_protection,
+ vm_inherit_t inheritance);
+
+extern kern_return_t vm_map_copyin(
+ vm_map_t src_map,
+ vm_map_address_t src_addr,
+ vm_map_size_t len,
+ boolean_t src_destroy,
+ vm_map_copy_t *copy_result); /* OUT */
+
+extern kern_return_t vm_map_copyin_common(
+ vm_map_t src_map,
+ vm_map_address_t src_addr,
+ vm_map_size_t len,
+ boolean_t src_destroy,
+ boolean_t src_volatile,
+ vm_map_copy_t *copy_result, /* OUT */
+ boolean_t use_maxprot);
+
+#define VM_MAP_COPYIN_SRC_DESTROY 0x00000001
+#define VM_MAP_COPYIN_USE_MAXPROT 0x00000002
+#define VM_MAP_COPYIN_ENTRY_LIST 0x00000004
+#define VM_MAP_COPYIN_PRESERVE_PURGEABLE 0x00000008
+#define VM_MAP_COPYIN_ALL_FLAGS 0x0000000F
+extern kern_return_t vm_map_copyin_internal(
+ vm_map_t src_map,
+ vm_map_address_t src_addr,
+ vm_map_size_t len,
+ int flags,
+ vm_map_copy_t *copy_result); /* OUT */
+
+extern kern_return_t vm_map_copy_extract(
+ vm_map_t src_map,
+ vm_map_address_t src_addr,
+ vm_map_size_t len,
+ vm_map_copy_t *copy_result, /* OUT */
+ vm_prot_t *cur_prot, /* OUT */
+ vm_prot_t *max_prot);
+
+
+extern void vm_map_disable_NX(
+ vm_map_t map);
+
+extern void vm_map_disallow_data_exec(
+ vm_map_t map);
+
+extern void vm_map_set_64bit(
+ vm_map_t map);
+
+extern void vm_map_set_32bit(
+ vm_map_t map);
+
+extern void vm_map_set_jumbo(
+ vm_map_t map);
+
+extern void vm_map_set_jit_entitled(
+ vm_map_t map);
+
+extern void vm_map_set_max_addr(
+ vm_map_t map, vm_map_offset_t new_max_offset);
+
+extern boolean_t vm_map_has_hard_pagezero(
+ vm_map_t map,
+ vm_map_offset_t pagezero_size);
+extern void vm_commit_pagezero_status(vm_map_t tmap);
+
+#ifdef __arm__
+static inline boolean_t
+vm_map_is_64bit(__unused vm_map_t map)
+{
+ return 0;
+}
+#else
+extern boolean_t vm_map_is_64bit(
+ vm_map_t map);
+#endif
+
+
+extern kern_return_t vm_map_raise_max_offset(
+ vm_map_t map,
+ vm_map_offset_t new_max_offset);
+
+extern kern_return_t vm_map_raise_min_offset(
+ vm_map_t map,
+ vm_map_offset_t new_min_offset);
+#if !CONFIG_EMBEDDED
+extern void vm_map_set_high_start(
+ vm_map_t map,
+ vm_map_offset_t high_start);
+#endif
+
+extern vm_map_offset_t vm_compute_max_offset(
+ boolean_t is64);
+
+extern void vm_map_get_max_aslr_slide_section(
+ vm_map_t map,
+ int64_t *max_sections,
+ int64_t *section_size);
+
+extern uint64_t vm_map_get_max_aslr_slide_pages(
+ vm_map_t map);
+
+extern uint64_t vm_map_get_max_loader_aslr_slide_pages(
+ vm_map_t map);
+
+extern void vm_map_set_user_wire_limit(
+ vm_map_t map,
+ vm_size_t limit);
+
+extern void vm_map_switch_protect(
+ vm_map_t map,
+ boolean_t val);
+
+extern void vm_map_iokit_mapped_region(
+ vm_map_t map,
+ vm_size_t bytes);
+
+extern void vm_map_iokit_unmapped_region(
+ vm_map_t map,
+ vm_size_t bytes);
+
+
+extern boolean_t first_free_is_valid(vm_map_t);
+
+extern int vm_map_page_shift(
+ vm_map_t map);
+
+extern vm_map_offset_t vm_map_page_mask(
+ vm_map_t map);