git: kernel - Add options SLAB_DEBUG to help debug memory corrup

看板DFBSD_commit作者時間15年前 (2011/02/16 04:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
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
文章代碼(AID): #1DMjk10f (DFBSD_commit)