kmemleak 101
This docuemnt explains kmemleak, which is memory leak detection tool for linux.
What is kmemleak TBD
Configuration CONFIG_DEBUG_KMEMLEAK CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE = 4096
Pass cmdline below if knob it not shown kmemleak=on
Usage Mount debugfs mount -t debugfs none /sys/kernel/debug
Scan memory leak echo scan > /sys/kernel/debug/kmemleak
Reset echo clear > /sys/kernel/debug/kmemleak
Ouput example 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 unreferenced object 0x9eac6dc0 (size 64): comm "dd", pid 1545, jiffies 4294952617 (age 854.