Changeset View
Changeset View
Standalone View
Standalone View
head/sys/vm/vm_map.h
Show First 20 Lines • Show All 167 Lines • ▼ Show 20 Lines | vm_map_entry_system_wired_count(vm_map_entry_t entry) | ||||
return (entry->wired_count - vm_map_entry_user_wired_count(entry)); | return (entry->wired_count - vm_map_entry_user_wired_count(entry)); | ||||
} | } | ||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
/* | /* | ||||
* A map is a set of map entries. These map entries are | * A map is a set of map entries. These map entries are | ||||
* organized both as a binary search tree and as a doubly-linked | * organized both as a binary search tree and as a doubly-linked | ||||
* list. Both structures are ordered based upon the start and | * list. Both structures are ordered based upon the start and | ||||
* end addresses contained within each map entry. Sleator and | * end addresses contained within each map entry. The list | ||||
* Tarjan's top-down splay algorithm is employed to control | * header has max start value and min end value to act as | ||||
* height imbalance in the binary search tree. | * sentinels for sequential search of the doubly-linked list. | ||||
* Sleator and Tarjan's top-down splay algorithm is employed to | |||||
* control height imbalance in the binary search tree. | |||||
* | * | ||||
* List of locks | * List of locks | ||||
* (c) const until freed | * (c) const until freed | ||||
*/ | */ | ||||
struct vm_map { | struct vm_map { | ||||
struct vm_map_entry header; /* List of entries */ | struct vm_map_entry header; /* List of entries */ | ||||
#define min_offset header.end /* (c) */ | |||||
#define max_offset header.start /* (c) */ | |||||
struct sx lock; /* Lock for map data */ | struct sx lock; /* Lock for map data */ | ||||
struct mtx system_mtx; | struct mtx system_mtx; | ||||
int nentries; /* Number of entries */ | int nentries; /* Number of entries */ | ||||
vm_size_t size; /* virtual size */ | vm_size_t size; /* virtual size */ | ||||
u_int timestamp; /* Version number */ | u_int timestamp; /* Version number */ | ||||
u_char needs_wakeup; | u_char needs_wakeup; | ||||
u_char system_map; /* (c) Am I a system map? */ | u_char system_map; /* (c) Am I a system map? */ | ||||
vm_flags_t flags; /* flags for this vm_map */ | vm_flags_t flags; /* flags for this vm_map */ | ||||
vm_map_entry_t root; /* Root of a binary search tree */ | vm_map_entry_t root; /* Root of a binary search tree */ | ||||
pmap_t pmap; /* (c) Physical map */ | pmap_t pmap; /* (c) Physical map */ | ||||
#define min_offset header.start /* (c) */ | |||||
#define max_offset header.end /* (c) */ | |||||
int busy; | int busy; | ||||
}; | }; | ||||
/* | /* | ||||
* vm_flags_t values | * vm_flags_t values | ||||
*/ | */ | ||||
#define MAP_WIREFUTURE 0x01 /* wire all future pages */ | #define MAP_WIREFUTURE 0x01 /* wire all future pages */ | ||||
#define MAP_BUSY_WAKEUP 0x02 | #define MAP_BUSY_WAKEUP 0x02 | ||||
▲ Show 20 Lines • Show All 201 Lines • Show Last 20 Lines |