aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/kmemleak.txt8
1 files changed, 3 insertions, 5 deletions
diff --git a/Documentation/kmemleak.txt b/Documentation/kmemleak.txt
index 6c18be97f3dd..a7563ec4ea7b 100644
--- a/Documentation/kmemleak.txt
+++ b/Documentation/kmemleak.txt
@@ -11,9 +11,7 @@ with the difference that the orphan objects are not freed but only
11reported via /sys/kernel/debug/kmemleak. A similar method is used by the 11reported via /sys/kernel/debug/kmemleak. A similar method is used by the
12Valgrind tool (memcheck --leak-check) to detect the memory leaks in 12Valgrind tool (memcheck --leak-check) to detect the memory leaks in
13user-space applications. 13user-space applications.
14 14Kmemleak is supported on x86, arm, powerpc, sparc, sh, microblaze, ppc, mips, s390, metag and tile.
15Please check DEBUG_KMEMLEAK dependencies in lib/Kconfig.debug for supported
16architectures.
17 15
18Usage 16Usage
19----- 17-----
@@ -69,7 +67,7 @@ Basic Algorithm
69 67
70The memory allocations via kmalloc, vmalloc, kmem_cache_alloc and 68The memory allocations via kmalloc, vmalloc, kmem_cache_alloc and
71friends are traced and the pointers, together with additional 69friends are traced and the pointers, together with additional
72information like size and stack trace, are stored in a prio search tree. 70information like size and stack trace, are stored in a rbtree.
73The corresponding freeing function calls are tracked and the pointers 71The corresponding freeing function calls are tracked and the pointers
74removed from the kmemleak data structures. 72removed from the kmemleak data structures.
75 73
@@ -85,7 +83,7 @@ The scanning algorithm steps:
85 1. mark all objects as white (remaining white objects will later be 83 1. mark all objects as white (remaining white objects will later be
86 considered orphan) 84 considered orphan)
87 2. scan the memory starting with the data section and stacks, checking 85 2. scan the memory starting with the data section and stacks, checking
88 the values against the addresses stored in the prio search tree. If 86 the values against the addresses stored in the rbtree. If
89 a pointer to a white object is found, the object is added to the 87 a pointer to a white object is found, the object is added to the
90 gray list 88 gray list
91 3. scan the gray objects for matching addresses (some white objects 89 3. scan the gray objects for matching addresses (some white objects