check kernel memory leak
2012-07-25 11:11
344 查看
How to check kernel memory leak:
Step 1: Compile kernel with "CONFIG_DEBUG_KMEMLEAK" option enabled. You can get to this option via: make menuconfig, "Kernel Hacking", "Kernel Memory Leak Detector" , while compiling your kernel.
Step 2: Increase the config option "Maximum kmemleak early log entires" value to a sufficiently large number like 1000. The default value of 400 may not work correctly in all configurations.
Step 3: Install this kernel and Reboot to this newly configured kernel. Do not be alarmed if your machine is slow.
Step 4: Upon reboot, Check if your debugfs is mounted. Otherwise mount it. If all is well, you should see a file kmemleak under your debugfs mounted location.
mount -t debugfs nodev /sys/kernel/debug/
Step 5: Do your functional test and check memory leak
cat /sys/kernel/debug/kmemleak, and check dump information
Step 1: Compile kernel with "CONFIG_DEBUG_KMEMLEAK" option enabled. You can get to this option via: make menuconfig, "Kernel Hacking", "Kernel Memory Leak Detector" , while compiling your kernel.
Step 2: Increase the config option "Maximum kmemleak early log entires" value to a sufficiently large number like 1000. The default value of 400 may not work correctly in all configurations.
Step 3: Install this kernel and Reboot to this newly configured kernel. Do not be alarmed if your machine is slow.
Step 4: Upon reboot, Check if your debugfs is mounted. Otherwise mount it. If all is well, you should see a file kmemleak under your debugfs mounted location.
mount -t debugfs nodev /sys/kernel/debug/
Step 5: Do your functional test and check memory leak
cat /sys/kernel/debug/kmemleak, and check dump information
相关文章推荐
- [MS Smartphone]Memory leak check
- Using the Kernel Debugger to Find a Kernel-Mode Memory Leak
- memory leak check tool: free
- Check Memory Leak
- Memory Leak Check
- valgrind memory leak check for nginx
- How to use umdh to check Windows memory leak
- valgrind-运行时诊断工具Memory Leak Check Tool
- The tools that check memory leak of python program
- opencl::kernel中获取local memory size
- (转载)ASP.NET Quiz Answers: Does Page.Cache leak memory?
- Memory Leak Detection in Embedded Systems
- to prevent a memory leak,the jdbc driver has been forcibly unregisterded
- KernelFaultCheck
- vld for memory leak detector (release version)
- JavaScript Memory Leak Detector
- OCCI中的内存泄漏 Memory Leak in OCCI
- base-kernel-memory-伙伴系统
- Memory Leak Detection in .NET
- Best Practice: A Summary of Normal Way to Debug Memory Leak