diff options
Diffstat (limited to 'sys/vm/vm_radix.c')
-rw-r--r-- | sys/vm/vm_radix.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/vm/vm_radix.c b/sys/vm/vm_radix.c index 8698738..ff311b2 100644 --- a/sys/vm/vm_radix.c +++ b/sys/vm/vm_radix.c @@ -432,6 +432,21 @@ restart: } /* + * Returns TRUE if the specified radix tree contains a single leaf and FALSE + * otherwise. + */ +boolean_t +vm_radix_is_singleton(struct vm_radix *rtree) +{ + struct vm_radix_node *rnode; + + rnode = vm_radix_getroot(rtree); + if (rnode == NULL) + return (FALSE); + return (vm_radix_isleaf(rnode)); +} + +/* * Returns the value stored at the index. If the index is not present, * NULL is returned. */ |