]> git.corax.cc Git - corax/commitdiff
Make debug messages in heap.c depend on CONFIG_DEBUG_HEAP instead of CONFIG_DEBUG...
authorMatthias Kruk <m@m10k.eu>
Fri, 20 Sep 2019 05:00:43 +0000 (14:00 +0900)
committerMatthias Kruk <m@m10k.eu>
Fri, 20 Sep 2019 05:00:43 +0000 (14:00 +0900)
kernel/arch/heap.c

index 25a97107bf1aa6f5f69c37975c5fa9ac92f7b555..bc73405645cbddda9ef66122a936e7b702ed14a2 100644 (file)
@@ -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;
 }