From fb0cb6f270ee746739dacc46381192c2bfc998f9 Mon Sep 17 00:00:00 2001 From: Masayuki Ishikawa Date: Thu, 1 Sep 2022 15:44:02 +0900 Subject: [PATCH] mm: umm_heap: Do not register Umem if CONFIG_BUILD_KERNEL=y Summary: - In the case of CONFIG_BUILD_KERNEL=y, showing Kmem and Page info is enough for free command Impact: - CONFIG_BUILD_KERNEL=y only Testing: - Tested with sabre-6quad:netknsh Signed-off-by: Masayuki Ishikawa --- mm/umm_heap/umm_initialize.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mm/umm_heap/umm_initialize.c b/mm/umm_heap/umm_initialize.c index 1eb726e669..4e96e23979 100644 --- a/mm/umm_heap/umm_initialize.c +++ b/mm/umm_heap/umm_initialize.c @@ -81,7 +81,11 @@ void umm_initialize(FAR void *heap_start, size_t heap_size) { +#ifdef CONFIG_BUILD_KERNEL + USR_HEAP = mm_initialize(NULL, heap_start, heap_size); +#else USR_HEAP = mm_initialize("Umem", heap_start, heap_size); +#endif } /****************************************************************************