diff options
author | rwatson <rwatson@FreeBSD.org> | 2003-03-26 20:44:29 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2003-03-26 20:44:29 +0000 |
commit | 84af8bf69584bea119ba7b3c9e07b69212da4fbf (patch) | |
tree | 41fc20af29b6435702bc0ff79a592d4537ff0d4b | |
parent | 23793c11720ffd37e1d27f5203c412c32bd84067 (diff) | |
download | FreeBSD-src-84af8bf69584bea119ba7b3c9e07b69212da4fbf.zip FreeBSD-src-84af8bf69584bea119ba7b3c9e07b69212da4fbf.tar.gz |
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.
-rw-r--r-- | sys/kern/kern_malloc.c | 1 |
1 files changed, 1 insertions, 0 deletions
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 |