From a91db09ec069e962dd16f4ae050f13beefab2830 Mon Sep 17 00:00:00 2001 From: Bosko Milekic Date: Wed, 16 Oct 2002 19:59:08 +0000 Subject: [PATCH] Fix a fairly subtle bug in mbuf_init() where the reference counter contiguous space was being allocated from the clust_map instead of the mbuf_map as the comments indicated. This resulted in some address space wastage in mbuf_map. Submitted by: Rohit Jalan --- sys/kern/subr_mbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_mbuf.c b/sys/kern/subr_mbuf.c index 87b9da65f6b..fb0d6261f27 100644 --- a/sys/kern/subr_mbuf.c +++ b/sys/kern/subr_mbuf.c @@ -418,7 +418,7 @@ mbuf_init(void *dummy) * Allocate all the required counters for clusters. This makes * cluster allocations/deallocations much faster. */ - cl_refcntmap = (u_int *)kmem_malloc(mb_list_clust.ml_map, + cl_refcntmap = (u_int *)kmem_malloc(mb_list_mbuf.ml_map, roundup(nmbclusters * sizeof(u_int), MSIZE), M_NOWAIT); if (cl_refcntmap == NULL) goto bad;