diff options
author | bmilekic <bmilekic@FreeBSD.org> | 2003-02-20 04:26:58 +0000 |
---|---|---|
committer | bmilekic <bmilekic@FreeBSD.org> | 2003-02-20 04:26:58 +0000 |
commit | 26ba0eb55ca13bca8cb911b471a949574a3b513b (patch) | |
tree | 01e5c8c145370b4dd9231e04fd70b4698c7d7db5 /sys/kern/kern_malloc.c | |
parent | 569e9d1a868a053312375c90c3f0c7ab35d18e47 (diff) | |
download | FreeBSD-src-26ba0eb55ca13bca8cb911b471a949574a3b513b.zip FreeBSD-src-26ba0eb55ca13bca8cb911b471a949574a3b513b.tar.gz |
o Allow "buckets" in mb_alloc to be differently sized (according to
compile-time constants). That is, a "bucket" now is not necessarily
a page-worth of mbufs or clusters, but it is MBUF_BUCK_SZ, CLUS_BUCK_SZ
worth of mbufs, clusters.
o Rename {mbuf,clust}_limit to {mbuf,clust}_hiwm and introduce
{mbuf,clust}_lowm, which currently has no effect but will be used
to set the low watermarks.
o Fix netstat so that it can deal with the differently-sized buckets
and teach it about the low watermarks too.
o Make sure the per-cpu stats for an absent CPU has mb_active set to 0,
explicitly.
o Get rid of the allocate refcounts from mbuf map mess. Instead,
just malloc() the refcounts in one shot from mbuf_init()
o Clean up / update comments in subr_mbuf.c
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r-- | sys/kern/kern_malloc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index c182120..04bf4b4 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -399,8 +399,7 @@ kmeminit(dummy) * amount to slightly more address space than we need for the submaps, * but it never hurts to have an extra page in kmem_map. */ - npg = (nmbufs * MSIZE + nmbclusters * MCLBYTES + nmbcnt * - sizeof(u_int) + vm_kmem_size) / PAGE_SIZE; + npg = (nmbufs*MSIZE + nmbclusters*MCLBYTES + vm_kmem_size) / PAGE_SIZE; kmem_map = kmem_suballoc(kernel_map, (vm_offset_t *)&kmembase, (vm_offset_t *)&kmemlimit, (vm_size_t)(npg * PAGE_SIZE)); |