看板 DFBSD_commit 關於我們 聯絡資訊
commit bbb201fd4d8144ecdb2817594a8eb79f1cd74062 Author: Matthew Dillon <dillon@apollo.backplane.com> Date: Tue Feb 15 11:37:38 2011 -0800 kernel - Add options SLAB_DEBUG to help debug memory corruption * Adding options SLAB_DEBUG to your kernel config will reconfigure kmalloc(), krealloc(), and kstrdup() to record all allocation sources on a zone-by-zone basis, file and line number. A full kernel recompile is needed when you add or drop this option from your kernel config. * Limited to 32 slots per slab. Since slabs offer a narrow range of chunk sizes this will normally be sufficient. * When a memory corruption related panic occurs kgdb can be used to determine who allocated out of the slab in question. Summary of changes: sys/conf/options | 1 + sys/kern/kern_slaballoc.c | 67 ++++++++++++++++++++++++++++++++++++++++++--- sys/sys/malloc.h | 24 +++++++++++++++- sys/sys/slaballoc.h | 16 +++++++++++ 4 files changed, 103 insertions(+), 5 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/bbb201fd4d8144ecdb2817594a8eb79f1cd74062 -- DragonFly BSD source repository