summaryrefslogtreecommitdiff
path: root/sys/kern/kern_malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r--sys/kern/kern_malloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index d0bdf1bba23..a344160b7ed 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_malloc.c,v 1.72 2007/09/07 10:22:15 art Exp $ */
+/* $OpenBSD: kern_malloc.c,v 1.73 2007/09/15 10:10:37 martin Exp $ */
/* $NetBSD: kern_malloc.c,v 1.15.4.2 1996/06/13 17:10:56 cgd Exp $ */
/*
@@ -201,7 +201,7 @@ malloc(unsigned long size, int type, int flags)
allocsize = round_page(size);
else
allocsize = 1 << indx;
- npg = btoc(allocsize);
+ npg = atop(round_page(allocsize));
va = (caddr_t) uvm_km_kmemalloc(kmem_map, NULL,
(vsize_t)ptoa(npg),
((flags & M_NOWAIT) ? UVM_KMF_NOWAIT : 0) |