Module Name: src
Committed By: mrg
Date: Fri Apr 13 06:27:03 UTC 2012
Modified Files:
src/sys/kern: subr_kmem.c
Log Message:
allow kmem_guard_depth to be set in the config file.
To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/kern/subr_kmem.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/subr_kmem.c
diff -u src/sys/kern/subr_kmem.c:1.43 src/sys/kern/subr_kmem.c:1.44
--- src/sys/kern/subr_kmem.c:1.43 Sun Apr 1 17:02:46 2012
+++ src/sys/kern/subr_kmem.c Fri Apr 13 06:27:02 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_kmem.c,v 1.43 2012/04/01 17:02:46 para Exp $ */
+/* $NetBSD: subr_kmem.c,v 1.44 2012/04/13 06:27:02 mrg 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.43 2012/04/01 17:02:46 para Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_kmem.c,v 1.44 2012/04/13 06:27:02 mrg Exp $");
#include <sys/param.h>
#include <sys/callback.h>
@@ -122,7 +122,10 @@ static pool_cache_t kmem_cache[KMEM_CACH
static size_t kmem_cache_maxidx __read_mostly;
#if defined(DEBUG)
-int kmem_guard_depth = 0;
+#ifndef KMEM_GUARD_DEPTH
+#define KMEM_GUARD_DEPTH 0
+#endif
+int kmem_guard_depth = KMEM_GUARD_DEPTH;
size_t kmem_guard_size;
static struct uvm_kmguard kmem_guard;
static void *kmem_freecheck;