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

Function vm_radix_node_put

freebsd/vm/vm_radix.c:152–171  ·  view source on GitHub ↗

* Free radix node. */

Source from the content-addressed store, hash-verified

150 * Free radix node.
151 */
152static __inline void
153vm_radix_node_put(struct vm_radix_node *rnode, int8_t last)
154{
155#ifdef INVARIANTS
156 int slot;
157
158 KASSERT(rnode->rn_count == 0,
159 ("vm_radix_node_put: rnode %p has %d children", rnode,
160 rnode->rn_count));
161 for (slot = 0; slot < VM_RADIX_COUNT; slot++) {
162 if (slot == last)
163 continue;
164 KASSERT(smr_unserialized_load(&rnode->rn_child[slot], true) ==
165 NULL, ("vm_radix_node_put: rnode %p has a child", rnode));
166 }
167#endif
168 /* Off by one so a freshly zero'd node is not assigned to. */
169 rnode->rn_last = last + 1;
170 uma_zfree_smr(vm_radix_node_zone, rnode);
171}
172
173/*
174 * Return the position in the array for a given level.

Callers 2

vm_radix_removeFunction · 0.85

Calls 1

uma_zfree_smrFunction · 0.85

Tested by

no test coverage detected