Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern don't overallocated once we leave the caches



details:   https://anonhg.NetBSD.org/src/rev/7fddb6df7e34
branches:  trunk
changeset: 778523:7fddb6df7e34
user:      para <para%NetBSD.org@localhost>
date:      Sun Apr 01 17:02:46 2012 +0000

description:
don't overallocated once we leave the caches

diffstat:

 sys/kern/subr_kmem.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 83ea51c639ee -r 7fddb6df7e34 sys/kern/subr_kmem.c
--- a/sys/kern/subr_kmem.c      Sun Apr 01 14:09:47 2012 +0000
+++ b/sys/kern/subr_kmem.c      Sun Apr 01 17:02:46 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_kmem.c,v 1.42 2012/02/05 03:40:08 rmind Exp $     */
+/*     $NetBSD: subr_kmem.c,v 1.43 2012/04/01 17:02:46 para Exp $      */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_kmem.c,v 1.42 2012/02/05 03:40:08 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_kmem.c,v 1.43 2012/04/01 17:02:46 para Exp $");
 
 #include <sys/param.h>
 #include <sys/callback.h>
@@ -180,7 +180,7 @@
 
        if (index >= kmem_cache_maxidx) {
                int ret = uvm_km_kmem_alloc(kmem_va_arena,
-                   (vsize_t)round_page(allocsz),
+                   (vsize_t)round_page(size),
                    ((kmflags & KM_SLEEP) ? VM_SLEEP : VM_NOSLEEP)
                     | VM_INSTANTFIT, (vmem_addr_t *)&p);
                return ret ? NULL : p;
@@ -229,7 +229,7 @@
 
        if (index >= kmem_cache_maxidx) {
                uvm_km_kmem_free(kmem_va_arena, (vaddr_t)p,
-                   round_page(allocsz));
+                   round_page(size));
                return;
        }
 



Home | Main Index | Thread Index | Old Index