diff options
author | Wang YanQing <udknight@gmail.com> | 2014-04-03 17:50:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-03 19:21:27 -0400 |
commit | 4762c98413836dfc3bff2857647f8d673a86d210 (patch) | |
tree | 5f34e7f47b3a0224583d126f6f44b8a30fae9102 /Documentation/kmemleak.txt | |
parent | 31e143686a39bff19a72d1806f9b8392c03dca92 (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.txt | 8 |
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 | |||
11 | reported via /sys/kernel/debug/kmemleak. A similar method is used by the | 11 | reported via /sys/kernel/debug/kmemleak. A similar method is used by the |
12 | Valgrind tool (memcheck --leak-check) to detect the memory leaks in | 12 | Valgrind tool (memcheck --leak-check) to detect the memory leaks in |
13 | user-space applications. | 13 | user-space applications. |
14 | 14 | Kmemleak is supported on x86, arm, powerpc, sparc, sh, microblaze, ppc, mips, s390, metag and tile. | |
15 | Please check DEBUG_KMEMLEAK dependencies in lib/Kconfig.debug for supported | ||
16 | architectures. | ||
17 | 15 | ||
18 | Usage | 16 | Usage |
19 | ----- | 17 | ----- |
@@ -69,7 +67,7 @@ Basic Algorithm | |||
69 | 67 | ||
70 | The memory allocations via kmalloc, vmalloc, kmem_cache_alloc and | 68 | The memory allocations via kmalloc, vmalloc, kmem_cache_alloc and |
71 | friends are traced and the pointers, together with additional | 69 | friends are traced and the pointers, together with additional |
72 | information like size and stack trace, are stored in a prio search tree. | 70 | information like size and stack trace, are stored in a rbtree. |
73 | The corresponding freeing function calls are tracked and the pointers | 71 | The corresponding freeing function calls are tracked and the pointers |
74 | removed from the kmemleak data structures. | 72 | removed 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 |