Kernel memory leak detector
modulename: kmemleak.ko
configname: CONFIG_DEBUG_KMEMLEAK
Linux Kernel Configuration
└─>Kernel memory leak detector
In linux kernel since version 2.6.31 (release Date: 2009-09-09)
Say Y here if you want to enable the memory leak
detector. The memory allocation/freeing is traced in a way
similar to the Boehm's conservative garbage collector, the
difference being that the orphan objects are not freed but
only shown in /sys/kernel/debug/kmemleak. Enabling this
feature will introduce an overhead to memory
allocations. See Documentation/kmemleak.txt for more
details.
Enabling DEBUG_SLAB or SLUB_DEBUG may increase the chances
of finding leaks due to the slab objects poisoning.
In order to access the kmemleak file, debugfs needs to be
mounted (usually at /sys/kernel/debug).
detector. The memory allocation/freeing is traced in a way
similar to the Boehm's conservative garbage collector, the
difference being that the orphan objects are not freed but
only shown in /sys/kernel/debug/kmemleak. Enabling this
feature will introduce an overhead to memory
allocations. See Documentation/kmemleak.txt for more
details.
Enabling DEBUG_SLAB or SLUB_DEBUG may increase the chances
of finding leaks due to the slab objects poisoning.
In order to access the kmemleak file, debugfs needs to be
mounted (usually at /sys/kernel/debug).
source code:
depends
CONFIG_DEBUG_KERNELCONFIG_EXPERIMENTAL
NOT CONFIG_MEMORY_HOTPLUG
CONFIG_ARM or CONFIG_MICROBLAZE or CONFIG_PPC or CONFIG_S390 or CONFIG_SPARC64 or CONFIG_SUPERH or CONFIG_TILE or CONFIG_X86 or CONFIG_HAVE_DEBUG_KMEMLEAK