summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-09-02 10:03:03 +0800
committerGitHub <[email protected]>2021-09-02 10:03:03 +0800
commitc89e7e43eddade839c62d4cfc45606a03e7aab31 (patch)
treef9453504e7a740011cbf376d3cc0bc6148024980 /src
parent42d90b9430c651c94ea7b022d321524b32a124e4 (diff)
parent1997113fbca8894dcaad75a6fa4e7b42396a4031 (diff)
Merge pull request #4976 from mysterywolf/finsh_kconfig
[finsh] finsh组件可以选择是否包含内置命令
Diffstat (limited to 'src')
-rw-r--r--src/memheap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/memheap.c b/src/memheap.c
index d0801d721b..e09f5c4bce 100644
--- a/src/memheap.c
+++ b/src/memheap.c
@@ -730,13 +730,15 @@ int memheaptrace(void)
if (count > 0)
{
int index;
+#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
extern int list_memheap(void);
+#endif
heaps = (struct rt_memheap **)rt_malloc(sizeof(struct rt_memheap *) * count);
if (heaps == RT_NULL) return 0;
-
+#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
list_memheap();
-
+#endif
rt_kprintf("memheap header size: %d\n", RT_MEMHEAP_SIZE);
count = rt_object_get_pointers(RT_Object_Class_MemHeap, (rt_object_t *)heaps, count);
for (index = 0; index < count; index++)