diff --git a/components/finsh/cmd.c b/components/finsh/cmd.c index 4ebbfc62d6e4330ef40d28c903623834dbeb5d29..1cd51de34f045432cf1a916e9f8a2ddb35c49bf9 100644 --- a/components/finsh/cmd.c +++ b/components/finsh/cmd.c @@ -287,14 +287,14 @@ static long _list_memheap(struct rt_list_node *list) struct rt_memheap *mh; struct rt_list_node *node; - rt_kprintf("memheap pool size available size\n"); - rt_kprintf("-------- --------- --------------\n"); + rt_kprintf("memheap pool size max used size available size\n"); + rt_kprintf("-------- ---------- ------------- --------------\n"); for (node = list->next; node != list; node = node->next) { mh = (struct rt_memheap *)rt_list_entry(node, struct rt_object, list); - rt_kprintf("%-8.*s %04d %04d\n", RT_NAME_MAX, mh->parent.name, - mh->pool_size, mh->available_size); + rt_kprintf("%-8.*s %-010d %-013d %-05d\n", RT_NAME_MAX, mh->parent.name, + mh->pool_size, mh->max_used_size, mh->available_size); } return 0; diff --git a/components/finsh/shell.c b/components/finsh/shell.c index 9fcfdd71f0735aec9c8079ee673224d5008dd55c..82cbc684850d69069a407c932294210ab99ead58 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -26,6 +26,10 @@ #include "finsh.h" #include "shell.h" +#ifdef _WIN32 +#include /* for putchar */ +#endif + /* finsh thread */ static struct rt_thread finsh_thread; ALIGN(RT_ALIGN_SIZE)