diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2009-07-07 05:33:00 -0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2009-07-08 09:25:14 -0400 |
commit | 53238a60dd4a679f6fe5613a7ed46899587205cf (patch) | |
tree | d2224ecfb18f7e9c6cc6fb2a48d81a87e5d5b62a /include/linux/kmemleak.h | |
parent | e4f7c0b44a8ac8935f223195af9ea637d0c08091 (diff) |
kmemleak: Allow partial freeing of memory blocks
Functions like free_bootmem() are allowed to free only part of a memory
block. This patch adds support for this via the kmemleak_free_part()
callback which removes the original object and creates one or two
additional objects as a result of the memory block split.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Diffstat (limited to 'include/linux/kmemleak.h')
-rw-r--r-- | include/linux/kmemleak.h | 4 |
1 files changed, 4 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); | |||
27 | extern void kmemleak_alloc(const void *ptr, size_t size, int min_count, | 27 | extern void kmemleak_alloc(const void *ptr, size_t size, int min_count, |
28 | gfp_t gfp); | 28 | gfp_t gfp); |
29 | extern void kmemleak_free(const void *ptr); | 29 | extern void kmemleak_free(const void *ptr); |
30 | extern void kmemleak_free_part(const void *ptr, size_t size); | ||
30 | extern void kmemleak_padding(const void *ptr, unsigned long offset, | 31 | extern void kmemleak_padding(const void *ptr, unsigned long offset, |
31 | size_t size); | 32 | size_t size); |
32 | extern void kmemleak_not_leak(const void *ptr); | 33 | extern void kmemleak_not_leak(const void *ptr); |
@@ -71,6 +72,9 @@ static inline void kmemleak_alloc_recursive(const void *ptr, size_t size, | |||
71 | static inline void kmemleak_free(const void *ptr) | 72 | static inline void kmemleak_free(const void *ptr) |
72 | { | 73 | { |
73 | } | 74 | } |
75 | static inline void kmemleak_free_part(const void *ptr, size_t size) | ||
76 | { | ||
77 | } | ||
74 | static inline void kmemleak_free_recursive(const void *ptr, unsigned long flags) | 78 | static inline void kmemleak_free_recursive(const void *ptr, unsigned long flags) |
75 | { | 79 | { |
76 | } | 80 | } |