diff --git a/sys/vm/vm_radix.c b/sys/vm/vm_radix.c index 44b3f237d9a2..ec6b475947b4 100644 --- a/sys/vm/vm_radix.c +++ b/sys/vm/vm_radix.c @@ -112,7 +112,7 @@ vm_radix_node_get(vm_pindex_t owner, uint16_t count, uint16_t clevel) { struct vm_radix_node *rnode; - rnode = uma_zalloc(vm_radix_node_zone, M_NOWAIT | M_ZERO); + rnode = uma_zalloc(vm_radix_node_zone, M_NOWAIT); if (rnode == NULL) return (NULL); rnode->rn_owner = owner; @@ -283,6 +283,16 @@ vm_radix_node_zone_dtor(void *mem, int size __unused, void *arg __unused) } #endif +static int +vm_radix_node_zone_init(void *mem, int size __unused, int flags __unused) +{ + struct vm_radix_node *rnode; + + rnode = mem; + bzero(rnode, sizeof(*rnode)); + return (0); +} + #ifndef UMA_MD_SMALL_ALLOC void vm_radix_reserve_kva(void); /* @@ -321,7 +331,7 @@ vm_radix_zinit(void) #else NULL, #endif - NULL, NULL, VM_RADIX_PAD, UMA_ZONE_VM); + vm_radix_node_zone_init, NULL, VM_RADIX_PAD, UMA_ZONE_VM); } /*