]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/vm/vm_map_store.h
xnu-4903.241.1.tar.gz
[apple/xnu.git] / osfmk / vm / vm_map_store.h
index dab7746ede3cf4ab1af84fa46fe85ffea6825c1c..8a0641c703516285f4f8b1c56911492b1b407cf0 100644 (file)
@@ -59,30 +59,34 @@ struct vm_map_store {
 #include <vm/vm_map_store_ll.h>
 #include <vm/vm_map_store_rb.h>
 
-#define UPDATE_HIGHEST_ENTRY_END(map, highest_entry)                           \
-       MACRO_BEGIN                                                             \
-       struct _vm_map* UHEE_map;                                               \
-       struct vm_map_entry*    UHEE_entry;                                             \
-       UHEE_map = (map);                                                       \
-       UHEE_entry = (highest_entry);                                           \
-       if( UHEE_map->highest_entry_end < UHEE_entry->vme_end) {                \
-               UHEE_map->highest_entry_end = UHEE_entry->vme_end;              \
+#define UPDATE_HIGHEST_ENTRY_END(map, highest_entry)                   \
+       MACRO_BEGIN                                                     \
+       struct _vm_map* UHEE_map;                                       \
+       struct vm_map_entry*    UHEE_entry;                             \
+       UHEE_map = (map);                                               \
+       assert(UHEE_map->disable_vmentry_reuse);                        \
+       assert(!UHEE_map->is_nested_map);                               \
+       UHEE_entry = (highest_entry);                                   \
+       if( UHEE_map->highest_entry_end < UHEE_entry->vme_end) {        \
+               UHEE_map->highest_entry_end = UHEE_entry->vme_end;      \
        }                                                               \
        MACRO_END
 
-#define        VM_MAP_HIGHEST_ENTRY(map, entry, start)                                 \
-       MACRO_BEGIN                                                             \
-       struct _vm_map* VMHE_map;                                                       \
-       struct vm_map_entry*    tmp_entry;                                              \
-       vm_map_offset_t VMHE_start;                                             \
-       VMHE_map = (map);                                                       \
-       VMHE_start= VMHE_map->highest_entry_end + PAGE_SIZE_64;                 \
-       while(vm_map_lookup_entry(VMHE_map, VMHE_start, &tmp_entry)){           \
-               VMHE_map->highest_entry_end = tmp_entry->vme_end;               \
-               VMHE_start = VMHE_map->highest_entry_end + PAGE_SIZE_64;        \
-       }                                                                       \
-       entry = tmp_entry;                                                      \
-       start = VMHE_start;                                                     \
+#define        VM_MAP_HIGHEST_ENTRY(map, entry, start)                         \
+       MACRO_BEGIN                                                     \
+       struct _vm_map* VMHE_map;                                       \
+       struct vm_map_entry*    tmp_entry;                              \
+       vm_map_offset_t VMHE_start;                                     \
+       VMHE_map = (map);                                               \
+       assert(VMHE_map->disable_vmentry_reuse);                        \
+       assert(!VMHE_map->is_nested_map);                               \
+       VMHE_start= VMHE_map->highest_entry_end + PAGE_SIZE_64;         \
+       while(vm_map_lookup_entry(VMHE_map, VMHE_start, &tmp_entry)){   \
+               VMHE_map->highest_entry_end = tmp_entry->vme_end;       \
+               VMHE_start = VMHE_map->highest_entry_end + PAGE_SIZE_64; \
+       }                                                               \
+       entry = tmp_entry;                                              \
+       start = VMHE_start;                                             \
        MACRO_END
 
 /*
@@ -114,6 +118,13 @@ struct vm_map_store {
        (map)->hint = (value);         \
        MACRO_END
 
+#define        SAVE_HINT_HOLE_WRITE(map,value) \
+       MACRO_BEGIN                    \
+       (map)->hole_hint = (value);     \
+       MACRO_END
+
+#define SKIP_RB_TREE           0xBAADC0D1
+
 #define VM_MAP_ENTRY_CREATE    1
 #define VM_MAP_ENTRY_DELETE    2
 
@@ -121,15 +132,15 @@ void vm_map_store_init( struct vm_map_header*  );
 boolean_t vm_map_store_lookup_entry( struct _vm_map*, vm_map_offset_t, struct vm_map_entry**);
 void   vm_map_store_update( struct _vm_map*, struct vm_map_entry*, int);
 void   _vm_map_store_entry_link( struct vm_map_header *, struct vm_map_entry*, struct vm_map_entry*);
-void   vm_map_store_entry_link( struct _vm_map*, struct vm_map_entry*, struct vm_map_entry*);
+void   vm_map_store_entry_link( struct _vm_map*, struct vm_map_entry*, struct vm_map_entry*, vm_map_kernel_flags_t);
 void   _vm_map_store_entry_unlink( struct vm_map_header *, struct vm_map_entry*);
 void   vm_map_store_entry_unlink( struct _vm_map*, struct vm_map_entry*);
-void   vm_map_store_update_first_free( struct _vm_map*, struct vm_map_entry*);
-void   vm_map_store_copy_insert( struct _vm_map*, struct vm_map_entry*, struct vm_map_copy*);
+void   vm_map_store_update_first_free( struct _vm_map*, struct vm_map_entry*, boolean_t new_entry_creation);
 void   vm_map_store_copy_reset( struct vm_map_copy*, struct vm_map_entry*);
 #if MACH_ASSERT
 boolean_t first_free_is_valid_store( struct _vm_map*);
 #endif
+boolean_t vm_map_store_has_RB_support( struct vm_map_header *hdr );
 
 #endif /* _VM_VM_MAP_STORE_H */