aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/kmemleak.txt
diff options
context:
space:
mode:
authorWang YanQing <udknight@gmail.com>2014-04-03 17:50:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-03 19:21:27 -0400
commit4762c98413836dfc3bff2857647f8d673a86d210 (patch)
tree5f34e7f47b3a0224583d126f6f44b8a30fae9102 /Documentation/kmemleak.txt
parent31e143686a39bff19a72d1806f9b8392c03dca92 (diff)
Documentation/kmemleak.txt: updates
Update Documentatin/kmemleak.txt to reflect the following changes: Commit b69ec42b1b19 ("Kconfig: clean up the long arch list for the DEBUG_KMEMLEAK config option") made it so that we can't check supported architectures by read Kconfig.debug. Commit 85d3a316c71 ("kmemleak: use rbtree instead of prio tree") converted kmemleak to use rbtree instead of prio tree. Signed-off-by: Wang YanQing <udknight@gmail.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/kmemleak.txt')
-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