Index: sys/vm/vm_radix.c =================================================================== --- sys/vm/vm_radix.c (revisione 235178) +++ sys/vm/vm_radix.c (copia locale) @@ -638,15 +638,22 @@ vm_radix_lookupn(struct vm_radix *rtree, vm_pindex if (end != 0 && start >= end) goto out; val = vm_radix_match(rnode->rn_child[slot], color); - if (val == NULL) + if (val == NULL) { + + /* Deal with wrap up of start address. */ + if ((VM_RADIX_MAXVAL - start) == 0) + goto out; continue; + } CTR4(KTR_VM, "lookupn: tree %p index %ju slot %d found child %p", rtree, (uintmax_t)start, slot, val); out[outidx] = val; if (++outidx == cnt) goto out; - } + } + if ((VM_RADIX_MAXVAL - start) == 0) + goto out; if (end != 0 && start >= end) break; } @@ -655,6 +662,7 @@ out: return (outidx); } +#if 0 void vm_radix_foreach(struct vm_radix *rtree, vm_pindex_t start, vm_pindex_t end, int color, void (*iter)(void *)) @@ -678,6 +686,7 @@ vm_radix_foreach(struct vm_radix *rtree, vm_pindex return; } } +#endif /* Index: sys/vm/vm_radix.h =================================================================== --- sys/vm/vm_radix.h (revisione 235178) +++ sys/vm/vm_radix.h (copia locale) @@ -64,8 +64,10 @@ int vm_radix_lookupn(struct vm_radix *, vm_pindex_ void *vm_radix_lookup_le(struct vm_radix *, vm_pindex_t, int); void vm_radix_reclaim_allnodes(struct vm_radix *); void *vm_radix_remove(struct vm_radix *, vm_pindex_t, int); +#if 0 void vm_radix_foreach(struct vm_radix *, vm_pindex_t, vm_pindex_t, int, void (*)(void *)); +#endif /* * Look up any entry at a position greater or equal to index.