lkml.org 
[lkml]   [2008]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/14] kmemleak: Add documentation on the memory leak detector
Catalin Marinas wrote:
> This patch adds the Documentation/kmemleak.txt file with some
> information about how kmemleak works.
>
> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
> ---
> Documentation/kernel-parameters.txt | 4 +
> Documentation/kmemleak.txt | 142 +++++++++++++++++++++++++++++++++++
> 2 files changed, 146 insertions(+), 0 deletions(-)
> create mode 100644 Documentation/kmemleak.txt
>
> diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
> index e0f346d..7f5f642 100644
> --- a/Documentation/kernel-parameters.txt
> +++ b/Documentation/kernel-parameters.txt
> @@ -1042,6 +1042,10 @@ and is between 256 and 4096 characters. It is defined in the file
> Configure the RouterBoard 532 series on-chip
> Ethernet adapter MAC address.
>
> + kmemleak= [KNL] Boot-time kmemleak enable/disable
> + Valid arguments: on, off
> + Default: on
> +
> l2cr= [PPC]
>
> l3cr= [PPC]
> diff --git a/Documentation/kmemleak.txt b/Documentation/kmemleak.txt
> new file mode 100644
> index 0000000..c84d91b
> --- /dev/null
> +++ b/Documentation/kmemleak.txt
> @@ -0,0 +1,142 @@
> +Kernel Memory Leak Detector
> +===========================
> +
> +Introduction
> +------------
> +
> +Kmemleak provides a way of detecting possible kernel memory leaks in a
> +way similar to a tracing garbage collector
> +(http://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29#Tracing_garbage_collectors),
> +with the difference that the orphan objects are not freed but only
> +reported via /sys/kernel/debug/kmemleak. A similar method is used by the
> +Valgrind tool (memcheck --leak-check) to detect the memory leaks in
> +user-space applications.
> +
> +Usage
> +-----
> +
> +CONFIG_DEBUG_KMEMLEAK in "Kernel hacking" has to be enabled. A kernel
> +thread scans the memory every 10 min (by default) and prints any new

minutes

> +unreferenced objects found. To trigger an intermediate scan and display
> +all the possible memory leaks:

Looks good otherwise. Thanks.

--
~Randy


\
 
 \ /
  Last update: 2008-12-19 19:33    [W:0.189 / U:4.156 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site