diff options
author | wollman <wollman@FreeBSD.org> | 1996-05-10 19:28:55 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1996-05-10 19:28:55 +0000 |
commit | a28a8481af3f2a2145d2a6c164a6299934c2bb3f (patch) | |
tree | fab5023c844a9f8148e7c028b3bd0bc0cb934ed5 /sys/amd64 | |
parent | 32706d589a389e3534278d9dec0d4dc6fbacbeca (diff) | |
download | FreeBSD-src-a28a8481af3f2a2145d2a6c164a6299934c2bb3f.zip FreeBSD-src-a28a8481af3f2a2145d2a6c164a6299934c2bb3f.tar.gz |
Allocate mbufs from a separate submap so that NMBCLUSTERS works as
expected.
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/machdep.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 86bd0bb..7fa891f 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.188 1996/05/02 22:24:57 phk Exp $ + * $Id: machdep.c,v 1.189 1996/05/03 21:00:53 phk Exp $ */ #include "npx.h" @@ -388,8 +388,15 @@ again: mclrefcnt = (char *)malloc(nmbclusters+PAGE_SIZE/MCLBYTES, M_MBUF, M_NOWAIT); bzero(mclrefcnt, nmbclusters+PAGE_SIZE/MCLBYTES); - mb_map = kmem_suballoc(kmem_map, (vm_offset_t *)&mbutl, &maxaddr, + mcl_map = kmem_suballoc(kmem_map, (vm_offset_t *)&mbutl, &maxaddr, nmbclusters * MCLBYTES, FALSE); + { + vm_size_t mb_map_size; + mb_map_size = nmbufs * MSIZE; + mb_map = kmem_suballoc(kmem_map, &minaddr, &maxaddr, + round_page(mb_map_size), FALSE); + } + /* * Initialize callouts */ |