diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1999-09-10 22:14:40 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1999-09-10 22:14:40 +0000 |
commit | 6c7f6bf3b78d5a195943ef8a4b6d7cab606fc6f3 (patch) | |
tree | deed5ef5b1c06dad5ed8b0518798300686dffa18 /sys | |
parent | bf20a0862f24d153803e8350119ed7c1e00fa548 (diff) |
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')
-rw-r--r-- | sys/kern/kern_malloc.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_bio.c | 4 |
2 files changed, 4 insertions, 4 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)); diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 1202f8db8de..465258ae403 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_bio.c,v 1.23 1999/07/15 14:07:41 art Exp $ */ +/* $OpenBSD: vfs_bio.c,v 1.24 1999/09/10 22:14:39 art Exp $ */ /* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */ /*- @@ -636,7 +636,7 @@ allocbuf(bp, size) vsize_t desired_size; int s; - desired_size = roundup(size, CLBYTES); + desired_size = clrnd(round_page(size)); if (desired_size > MAXBSIZE) panic("allocbuf: buffer larger than MAXBSIZE requested"); |