Lines Matching defs:tree

2561  * the cpu in question are considered to be leaves in a tree of resources.
2564 * 1. A lpl structure that contains resources already in the hierarchy tree.
2637 * the cpu in question are considered to be leaves in a tree of resources.
3556 * Get shared memory allocation policy with given tree and offset
3566 avl_tree_t *tree;
3570 * Get policy segment tree from anon_map or vnode and use specified
3582 tree = shm_locality->loc_tree;
3589 tree = shm_locality->loc_tree;
3593 if (tree == NULL)
3602 policy_seg = avl_find(tree, &off, &where);
3982 * Destroy the given shared memory policy segment tree
3985 lgrp_shm_policy_tree_destroy(avl_tree_t *tree)
3990 if (tree == NULL)
3993 cur = (lgrp_shm_policy_seg_t *)avl_first(tree);
3995 next = AVL_NEXT(tree, cur);
3996 avl_remove(tree, cur);
4000 kmem_free(tree, sizeof (avl_tree_t));
4012 * For anon_map, deallocate shared memory policy tree and
4048 * Used by AVL tree code for searching
4067 lgrp_shm_policy_concat(avl_tree_t *tree, lgrp_shm_policy_seg_t *seg1,
4076 avl_remove(tree, seg2);
4086 lgrp_shm_policy_split(avl_tree_t *tree, lgrp_shm_policy_seg_t *seg,
4112 * Find where to insert new segment in AVL tree and insert it
4114 (void) avl_find(tree, &off, &where);
4115 avl_insert(tree, newseg, where);
4140 avl_tree_t *tree;
4189 * Create AVL tree if there isn't one yet
4193 tree = shm_locality->loc_tree;
4194 if (!tree) {
4197 tree = kmem_alloc(sizeof (avl_tree_t), KM_SLEEP);
4201 avl_create(tree, lgrp_shm_policy_compar,
4204 shm_locality->loc_tree = tree;
4207 * Another thread managed to set up the tree
4208 * before we could. Free the tree we allocated
4211 kmem_free(tree, sizeof (*tree));
4212 tree = shm_locality->loc_tree;
4219 * Need to maintain hold on writer's lock to keep tree from
4226 seg = avl_find(tree, &off, &where);
4239 avl_insert(tree, newseg, where);
4246 seg = AVL_NEXT(tree, newseg);
4262 prev = AVL_PREV(tree, newseg);
4263 next = AVL_NEXT(tree, newseg);
4264 (void) lgrp_shm_policy_concat(tree, newseg, next);
4265 (void) lgrp_shm_policy_concat(tree, prev, newseg);
4308 prev = AVL_PREV(tree, seg);
4309 next = AVL_NEXT(tree, seg);
4310 (void) lgrp_shm_policy_concat(tree, seg, next);
4311 (void) lgrp_shm_policy_concat(tree, prev, seg);
4324 newseg = lgrp_shm_policy_split(tree, seg, off);
4334 (void) lgrp_shm_policy_concat(tree,
4335 newseg, AVL_NEXT(tree, newseg));
4346 (void) lgrp_shm_policy_split(tree,
4352 (void) lgrp_shm_policy_split(tree, seg,
4359 (void) lgrp_shm_policy_concat(tree,
4360 AVL_PREV(tree, seg), seg);