diff options
author | 1999-09-10 22:14:39 +0000 | |
---|---|---|
committer | 1999-09-10 22:14:39 +0000 | |
commit | a88102987167e6cfbaecc63508a30c8e27b36770 (patch) | |
tree | 11de56feefe228414c165a48345ad101977a319a /sys/kern/kern_malloc.c | |
parent | use round_page(foo) instead of roundup(foo, NBPG) (diff) | |
download | wireguard-openbsd-a88102987167e6cfbaecc63508a30c8e27b36770.tar.xz wireguard-openbsd-a88102987167e6cfbaecc63508a30c8e27b36770.zip |
use clrnd(round_page(size)) instead of roundup(size, CLBYTES).
They do the same thing, but the former is noticeably faster on sparc
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r-- | sys/kern/kern_malloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 3b94a4897eb..6b747841fc4 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_malloc.c,v 1.16 1999/07/15 14:07:41 art Exp $ */ +/* $OpenBSD: kern_malloc.c,v 1.17 1999/09/10 22:14:39 art Exp $ */ /* $NetBSD: kern_malloc.c,v 1.15.4.2 1996/06/13 17:10:56 cgd Exp $ */ /* @@ -145,7 +145,7 @@ malloc(size, type, flags) if (kbp->kb_next == NULL) { kbp->kb_last = NULL; if (size > MAXALLOCSAVE) - allocsize = roundup(size, CLBYTES); + allocsize = clrnd(round_page(size)); else allocsize = 1 << indx; npg = clrnd(btoc(allocsize)); |