summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_malloc.c
diff options
context:
space:
mode:
authormartin <martin@openbsd.org>2007-09-15 10:10:37 +0000
committermartin <martin@openbsd.org>2007-09-15 10:10:37 +0000
commit76d52da231e3b510767d12369eed23b2a910fc75 (patch)
tree0f423aa52860e1d892feb4130f73f56be08e51be /sys/kern/kern_malloc.c
parentconvert bus_dmamap_unload() calls (diff)
downloadwireguard-openbsd-76d52da231e3b510767d12369eed23b2a910fc75.tar.xz
wireguard-openbsd-76d52da231e3b510767d12369eed23b2a910fc75.zip
replace ctob and btoc with ptoa and atop respectively
help and ok miod@ thib@
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) |