aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-07-12 15:24:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-07-12 15:24:35 -0400
commit7638d5322bd89d49e013a03fe2afaeb6d214fabd (patch)
treecfafc7c6c9f169a7a308c290363dde765e21735d /include
parentdd0d9a46f573b086a67522f819566427dba9c4c7 (diff)
parent264ef8a904943ed7d0b04fa958894d7a5c2b2c61 (diff)
Merge branch 'kmemleak' of git://linux-arm.org/linux-2.6
* 'kmemleak' of git://linux-arm.org/linux-2.6: kmemleak: Remove alloc_bootmem annotations introduced in the past kmemleak: Add callbacks to the bootmem allocator kmemleak: Allow partial freeing of memory blocks kmemleak: Trace the kmalloc_large* functions in slub kmemleak: Scan objects allocated during a scanning episode kmemleak: Do not acquire scan_mutex in kmemleak_open() kmemleak: Remove the reported leaks number limitation kmemleak: Add more cond_resched() calls in the scanning thread kmemleak: Renice the scanning thread to +10
Diffstat (limited to 'include')
-rw-r--r--include/linux/kmemleak.h4
-rw-r--r--include/linux/slub_def.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/kmemleak.h b/include/linux/kmemleak.h
index 7796aed6cdd5..6a63807f714e 100644
--- a/include/linux/kmemleak.h
+++ b/include/linux/kmemleak.h
@@ -27,6 +27,7 @@ extern void kmemleak_init(void);
27extern void kmemleak_alloc(const void *ptr, size_t size, int min_count, 27extern void kmemleak_alloc(const void *ptr, size_t size, int min_count,
28 gfp_t gfp); 28 gfp_t gfp);
29extern void kmemleak_free(const void *ptr); 29extern void kmemleak_free(const void *ptr);
30extern void kmemleak_free_part(const void *ptr, size_t size);
30extern void kmemleak_padding(const void *ptr, unsigned long offset, 31extern void kmemleak_padding(const void *ptr, unsigned long offset,
31 size_t size); 32 size_t size);
32extern void kmemleak_not_leak(const void *ptr); 33extern void kmemleak_not_leak(const void *ptr);
@@ -71,6 +72,9 @@ static inline void kmemleak_alloc_recursive(const void *ptr, size_t size,
71static inline void kmemleak_free(const void *ptr) 72static inline void kmemleak_free(const void *ptr)
72{ 73{
73} 74}
75static inline void kmemleak_free_part(const void *ptr, size_t size)
76{
77}
74static inline void kmemleak_free_recursive(const void *ptr, unsigned long flags) 78static inline void kmemleak_free_recursive(const void *ptr, unsigned long flags)
75{ 79{
76} 80}
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index 4dcbc2c71491..c1c862b1d01a 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -11,6 +11,7 @@
11#include <linux/workqueue.h> 11#include <linux/workqueue.h>
12#include <linux/kobject.h> 12#include <linux/kobject.h>
13#include <linux/kmemtrace.h> 13#include <linux/kmemtrace.h>
14#include <linux/kmemleak.h>
14 15
15enum stat_item { 16enum stat_item {
16 ALLOC_FASTPATH, /* Allocation from cpu slab */ 17 ALLOC_FASTPATH, /* Allocation from cpu slab */
@@ -233,6 +234,7 @@ static __always_inline void *kmalloc_large(size_t size, gfp_t flags)
233 unsigned int order = get_order(size); 234 unsigned int order = get_order(size);
234 void *ret = (void *) __get_free_pages(flags | __GFP_COMP, order); 235 void *ret = (void *) __get_free_pages(flags | __GFP_COMP, order);
235 236
237 kmemleak_alloc(ret, size, 1, flags);
236 trace_kmalloc(_THIS_IP_, ret, size, PAGE_SIZE << order, flags); 238 trace_kmalloc(_THIS_IP_, ret, size, PAGE_SIZE << order, flags);
237 239
238 return ret; 240 return ret;