summaryrefslogtreecommitdiffstats
path: root/sys/sun4v
diff options
context:
space:
mode:
authormdf <mdf@FreeBSD.org>2010-07-28 15:36:12 +0000
committermdf <mdf@FreeBSD.org>2010-07-28 15:36:12 +0000
commit6857471cf3ec44101821a34c3d7dc18913d0c22b (patch)
tree4b57fa8bbbe414dcfd4fe89f40c3c9cae5d70fa3 /sys/sun4v
parent6aaf496254ae07085fc7ab479c417e5161b455dc (diff)
downloadFreeBSD-src-6857471cf3ec44101821a34c3d7dc18913d0c22b.zip
FreeBSD-src-6857471cf3ec44101821a34c3d7dc18913d0c22b.tar.gz
Add MALLOC_DEBUG_MAXZONES debug malloc(9) option to use multiple uma
zones for each malloc bucket size. The purpose is to isolate different malloc types into hash classes, so that any buffer overruns or use-after-free will usually only affect memory from malloc types in that hash class. This is purely a debugging tool; by varying the hash function and tracking which hash class was corrupted, the intersection of the hash classes from each instance will point to a single malloc type that is being misused. At this point inspection or memguard(9) can be used to catch the offending code. Add MALLOC_DEBUG_MAXZONES=8 to -current GENERIC configuration files. The suggestion to have this on by default came from Kostik Belousov on -arch. This code is based on work by Ron Steinke at Isilon Systems. Reviewed by: -arch (mostly silence) Reviewed by: zml Approved by: zml (mentor)
Diffstat (limited to 'sys/sun4v')
-rw-r--r--sys/sun4v/conf/GENERIC1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sun4v/conf/GENERIC b/sys/sun4v/conf/GENERIC
index 26ec3af..f7a4e77 100644
--- a/sys/sun4v/conf/GENERIC
+++ b/sys/sun4v/conf/GENERIC
@@ -79,6 +79,7 @@ options DDB # Support DDB.
#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS
#options WITNESS # Enable checks to detect deadlocks and cycles
#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed
+#options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones
#options DEBUG_LOCKS
#options DEBUG_VFS_LOCKS
OpenPOWER on IntegriCloud