From 29145bab8a8fe1dc97aa9afa2957011d3bcd16b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 2 Aug 2010 11:10:51 +0000 Subject: [PATCH] * Allow heap.cpp to compile if both, KERNEL_HEAP_LEAK_CHECK, and USE_SLAB_ALLOCATOR_FOR_MALLOC are defined. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37837 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/heap.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/system/kernel/heap.cpp b/src/system/kernel/heap.cpp index d8153d95f0..7a8f270454 100644 --- a/src/system/kernel/heap.cpp +++ b/src/system/kernel/heap.cpp @@ -32,6 +32,11 @@ #endif +#if USE_SLAB_ALLOCATOR_FOR_MALLOC +# undef KERNEL_HEAP_LEAK_CHECK +#endif + + #if KERNEL_HEAP_LEAK_CHECK typedef struct heap_leak_check_info_s { addr_t caller; @@ -49,7 +54,7 @@ struct caller_info { static const int32 kCallerInfoTableSize = 1024; static caller_info sCallerInfoTable[kCallerInfoTableSize]; static int32 sCallerInfoCount = 0; -#endif +#endif // KERNEL_HEAP_LEAK_CHECK typedef struct heap_page_s heap_page; @@ -278,9 +283,6 @@ class Free : public AbstractTraceEntry { // #pragma mark - Debug functions -#if !USE_SLAB_ALLOCATOR_FOR_MALLOC - - #if KERNEL_HEAP_LEAK_CHECK static addr_t get_caller() @@ -303,6 +305,9 @@ get_caller() #endif +#if !USE_SLAB_ALLOCATOR_FOR_MALLOC + + static void dump_page(heap_page *page) {