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 <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa 2022-09-01 15:44:02 +09:00 committed by Petro Karashchenko
parent 27985fa639
commit fb0cb6f270
1 changed files with 4 additions and 0 deletions

View File

@ -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
}
/****************************************************************************