From 1b680cd9341ecdd69e60167ac0c4c4ec732dd3c4 Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Fri, 20 Sep 2019 14:00:43 +0900 Subject: [PATCH] Make debug messages in heap.c depend on CONFIG_DEBUG_HEAP instead of CONFIG_DEBUG since they cause a lot of output --- kernel/arch/heap.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/kernel/arch/heap.c b/kernel/arch/heap.c index 25a9710..bc73405 100644 --- a/kernel/arch/heap.c +++ b/kernel/arch/heap.c @@ -35,7 +35,7 @@ static struct { u32_t h_free; } _kheap; -#if FEATURE(DEBUG) +#if FEATURE(DEBUG_HEAP) void heap_debug(void) { struct heap_node *cur; @@ -58,7 +58,7 @@ void heap_debug(void) return; } -#endif /* FEATURE(DEBUG) */ +#endif /* FEATURE(DEBUG_HEAP) */ void heap_init(void *base, u32_t size) { @@ -151,8 +151,6 @@ void* kmalloc(u32_t size) heap_grow(size); } - heap_debug(); - for(cur = (struct heap_node*)_kheap.h_base; cur; cur = cur->hn_next) { @@ -199,9 +197,9 @@ void* kmalloc(u32_t size) break; } -#if FEATURE(DEBUG) +#if FEATURE(DEBUG_HEAP) heap_debug(); -#endif /* FEATURE(DEBUG) */ +#endif /* FEATURE(DEBUG_HEAP) */ return(ret_val); } @@ -228,9 +226,9 @@ void kfree(void *ptr) } } -#if FEATURE(DEBUG) +#if FEATURE(DEBUG_HEAP) heap_debug(); -#endif /* FEATURE(DEBUG) */ +#endif /* FEATURE(DEBUG_HEAP) */ return; } -- 2.47.3