From 84af8bf69584bea119ba7b3c9e07b69212da4fbf Mon Sep 17 00:00:00 2001 From: rwatson Date: Wed, 26 Mar 2003 20:44:29 +0000 Subject: Permit debug.malloc.failure_rate to be specified using a tunable so that the feature can be enabled during the boot process. Note the continued limitation that FreeBSD fails so rapidly with this setting enabled that it's hard to narrow down particular failures for correction; we really need per-malloc type failure rates. --- sys/kern/kern_malloc.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/kern/kern_malloc.c') diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 048c4b34..996b110 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -151,6 +151,7 @@ static int malloc_nowait_count; static int malloc_failure_count; SYSCTL_INT(_debug_malloc, OID_AUTO, failure_rate, CTLFLAG_RW, &malloc_failure_rate, 0, "Every (n) mallocs with M_NOWAIT will fail"); +TUNABLE_INT("debug.malloc.failure_rate", &malloc_failure_rate); SYSCTL_INT(_debug_malloc, OID_AUTO, failure_count, CTLFLAG_RD, &malloc_failure_count, 0, "Number of imposed M_NOWAIT malloc failures"); #endif -- cgit v1.1