Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


View file
namekmemleak_report_for_kmeleak_test_module.txt
height250
View file
namekmemleak-test.ko
height250


Limitations and Drawbacks

While kmemleak can be a useful tool for detecting and reporting memory leaks in the Linux kernel, there are several limitations and drawbacks to consider:
The main drawback is the reduced performance of memory allocation and freeing. To avoid other penalties, the memory scanning is only performed when the /sys/kernel/debug/kmemleak file is read. Anyway, this tool is intended for debugging purposes where the performance might not be the most important requirement.

  1. False positives: Kmemleak may report potential memory leaks that are actually false positives, leading to unnecessary investigation and debugging.

  2. Overhead: Kmemleak can increase the overhead of the kernel, particularly during the initial scanning phase. This can impact system performance and resource utilization.

  3. Incomplete coverage: Kmemleak may not be able to detect all memory leaks, particularly those that occur in modules or code that are not regularly scanned.

  4. Debugging complexity: Debugging memory leaks can be a complex and time-consuming process, particularly in large and complex kernel codebases.



Ref: https://static.lwn.net/kerneldoc/dev-tools/kmemleak.html