From: Matthias Kruk Date: Fri, 20 Sep 2019 05:00:43 +0000 (+0900) Subject: Make debug messages in heap.c depend on CONFIG_DEBUG_HEAP instead of CONFIG_DEBUG... X-Git-Url: https://git.corax.cc/?a=commitdiff_plain;h=1b680cd9341ecdd69e60167ac0c4c4ec732dd3c4;p=corax Make debug messages in heap.c depend on CONFIG_DEBUG_HEAP instead of CONFIG_DEBUG since they cause a lot of output --- 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; }