MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vm_map_splay_split

Function vm_map_splay_split

freebsd/vm/vm_map.c:1160–1184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1158 * values in &map->header.
1159 */
1160static __always_inline vm_map_entry_t
1161vm_map_splay_split(vm_map_t map, vm_offset_t addr, vm_size_t length,
1162 vm_map_entry_t *llist, vm_map_entry_t *rlist)
1163{
1164 vm_map_entry_t left, right, root, y;
1165
1166 left = right = &map->header;
1167 root = map->root;
1168 while (root != NULL && root->max_free >= length) {
1169 KASSERT(left->end <= root->start &&
1170 root->end <= right->start,
1171 ("%s: root not within tree bounds", __func__));
1172 if (addr < root->start) {
1173 SPLAY_LEFT_STEP(root, y, left, right,
1174 y->max_free >= length && addr < y->start);
1175 } else if (addr >= root->end) {
1176 SPLAY_RIGHT_STEP(root, y, left, right,
1177 y->max_free >= length && addr >= y->end);
1178 } else
1179 break;
1180 }
1181 *llist = left;
1182 *rlist = right;
1183 return (root);
1184}
1185
1186static __always_inline void
1187vm_map_splay_findnext(vm_map_entry_t root, vm_map_entry_t *rlist)

Callers 5

vm_map_splayFunction · 0.85
vm_map_entry_linkFunction · 0.85
vm_map_entry_unlinkFunction · 0.85
vm_map_entry_resizeFunction · 0.85
vm_map_findspaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected