diff --git a/Kconfig b/Kconfig index 0e7ccce2ff..8a0289f3d3 100644 --- a/Kconfig +++ b/Kconfig @@ -798,13 +798,6 @@ config DEBUG_DMA_INFO endif # DEBUG_DMA -config DEBUG_HEAP - bool "Heap usage debug hooks" - default n - depends on ARCH_HAVE_HEAPCHECK - ---help--- - Enable hooks to check heap usage. Only supported by a few architectures. - config DEBUG_IRQ bool "Interrupt Controller Debug Features" default n @@ -1243,6 +1236,14 @@ config STACK_COLORATION Only supported by a few architectures. +config HEAP_COLORATION + bool "Heap coloration" + default n + depends on ARCH_HAVE_HEAPCHECK + ---help--- + Enable heap coloration to check heap usage. Only supported by a few + architectures. + config DEBUG_SYMBOLS bool "Generate Debug Symbols" default n diff --git a/arch/arm/src/stm32/stm32_allocateheap.c b/arch/arm/src/stm32/stm32_allocateheap.c index 02ba165a13..a222253af5 100644 --- a/arch/arm/src/stm32/stm32_allocateheap.c +++ b/arch/arm/src/stm32/stm32_allocateheap.c @@ -439,7 +439,7 @@ * ****************************************************************************/ -#ifdef CONFIG_DEBUG_HEAP +#ifdef CONFIG_HEAP_COLORATION static inline void up_heap_color(FAR void *start, size_t size) { memset(start, HEAP_COLOR, size); diff --git a/arch/arm/src/stm32f7/stm32_allocateheap.c b/arch/arm/src/stm32f7/stm32_allocateheap.c index 919890b833..541e0654b1 100644 --- a/arch/arm/src/stm32f7/stm32_allocateheap.c +++ b/arch/arm/src/stm32f7/stm32_allocateheap.c @@ -167,7 +167,7 @@ * ****************************************************************************/ -#ifdef CONFIG_DEBUG_HEAP +#ifdef CONFIG_HEAP_COLORATION static inline void up_heap_color(FAR void *start, size_t size) { memset(start, HEAP_COLOR, size); diff --git a/arch/arm/src/stm32l4/stm32l4_allocateheap.c b/arch/arm/src/stm32l4/stm32l4_allocateheap.c index d5ac105436..dc39c59e51 100644 --- a/arch/arm/src/stm32l4/stm32l4_allocateheap.c +++ b/arch/arm/src/stm32l4/stm32l4_allocateheap.c @@ -148,7 +148,7 @@ * ****************************************************************************/ -#ifdef CONFIG_DEBUG_HEAP +#ifdef CONFIG_HEAP_COLORATION static inline void up_heap_color(FAR void *start, size_t size) { memset(start, HEAP_COLOR, size); diff --git a/configs/nucleo-l476rg/nsh/defconfig b/configs/nucleo-l476rg/nsh/defconfig index 40d1757a02..a79d819837 100644 --- a/configs/nucleo-l476rg/nsh/defconfig +++ b/configs/nucleo-l476rg/nsh/defconfig @@ -60,7 +60,7 @@ CONFIG_DEBUG_LIB=y # OS Function Debug Options # # CONFIG_DEBUG_DMA is not set -# CONFIG_DEBUG_HEAP is not set +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_IRQ is not set # diff --git a/configs/shenzhou/thttpd/defconfig b/configs/shenzhou/thttpd/defconfig index f59e2704af..b6a706238d 100644 --- a/configs/shenzhou/thttpd/defconfig +++ b/configs/shenzhou/thttpd/defconfig @@ -60,7 +60,7 @@ CONFIG_ARCH_HAVE_HEAPCHECK=y # # OS Function Debug Options # -# CONFIG_DEBUG_HEAP is not set +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_IRQ is not set # diff --git a/configs/stm32f429i-disco/ltdc/defconfig b/configs/stm32f429i-disco/ltdc/defconfig index ce2a6655cd..cea3ab6a9a 100644 --- a/configs/stm32f429i-disco/ltdc/defconfig +++ b/configs/stm32f429i-disco/ltdc/defconfig @@ -59,7 +59,7 @@ CONFIG_ARCH_HAVE_HEAPCHECK=y # # OS Function Debug Options # -# CONFIG_DEBUG_HEAP is not set +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_IRQ is not set # diff --git a/configs/stm32f4discovery/rgbled/defconfig b/configs/stm32f4discovery/rgbled/defconfig index 737163cc46..d01e11f109 100644 --- a/configs/stm32f4discovery/rgbled/defconfig +++ b/configs/stm32f4discovery/rgbled/defconfig @@ -59,7 +59,7 @@ CONFIG_ARCH_HAVE_HEAPCHECK=y # # OS Function Debug Options # -# CONFIG_DEBUG_HEAP is not set +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_IRQ is not set # diff --git a/configs/stm32l476vg-disco/nsh/defconfig b/configs/stm32l476vg-disco/nsh/defconfig index bb35e16b4d..3d27e736d2 100644 --- a/configs/stm32l476vg-disco/nsh/defconfig +++ b/configs/stm32l476vg-disco/nsh/defconfig @@ -60,7 +60,7 @@ CONFIG_ARCH_HAVE_HEAPCHECK=y # OS Function Debug Options # # CONFIG_DEBUG_DMA is not set -# CONFIG_DEBUG_HEAP is not set +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_IRQ is not set #