diff options
author | phk <phk@FreeBSD.org> | 1996-05-02 14:21:14 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1996-05-02 14:21:14 +0000 |
commit | 5a6fb3a7da69f11fbe5093f4a2cc7a4d86df5b36 (patch) | |
tree | c11aef2f7af5663393e978cd03a223a2ffbe6c69 /sys/kern/kern_malloc.c | |
parent | 189514aa416a464e44c25c45746e8ed5e850f03d (diff) | |
download | FreeBSD-src-5a6fb3a7da69f11fbe5093f4a2cc7a4d86df5b36.zip FreeBSD-src-5a6fb3a7da69f11fbe5093f4a2cc7a4d86df5b36.tar.gz |
removed:
CLBYTES PD_SHIFT PGSHIFT NBPG PGOFSET CLSIZELOG2 CLSIZE pdei()
ptei() kvtopte() ptetov() ispt() ptetoav() &c &c
new:
NPDEPG
Major macro cleanup.
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r-- | sys/kern/kern_malloc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 3bd7721..bfdc4bb 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_malloc.c 8.3 (Berkeley) 1/4/94 - * $Id: kern_malloc.c,v 1.19 1996/01/29 11:12:37 davidg Exp $ + * $Id: kern_malloc.c,v 1.20 1996/05/02 10:43:17 phk Exp $ */ #include <sys/param.h> @@ -141,7 +141,7 @@ malloc(size, type, flags) allocsize = roundup(size, PAGE_SIZE); else allocsize = 1 << indx; - npg = clrnd(btoc(allocsize)); + npg = btoc(allocsize); va = (caddr_t) kmem_malloc(kmem_map, (vm_size_t)ctob(npg), flags); if (va == NULL) { splx(s); @@ -171,7 +171,7 @@ malloc(size, type, flags) * bucket, don't assume the list is still empty. */ savedlist = kbp->kb_next; - kbp->kb_next = cp = va + (npg * NBPG) - allocsize; + kbp->kb_next = cp = va + (npg * PAGE_SIZE) - allocsize; for (;;) { freep = (struct freelist *)cp; #ifdef DIAGNOSTIC @@ -298,7 +298,7 @@ free(addr, type) if (size > MAXALLOCSAVE) { kmem_free(kmem_map, (vm_offset_t)addr, ctob(kup->ku_pagecnt)); #ifdef KMEMSTATS - size = kup->ku_pagecnt << PGSHIFT; + size = kup->ku_pagecnt << PAGE_SHIFT; ksp->ks_memuse -= size; kup->ku_indx = 0; kup->ku_pagecnt = 0; |