summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2022-07-06 12:07:17 -0400
committerguo <[email protected]>2022-07-07 18:08:06 +0800
commitb01c2b8a5a9f6c224597c76abb22cb77337adf99 (patch)
treeab2847119d7705f123e277a9ffd68f7f3a47cc25 /components
parent3f0934feb730bcadf4d1f18400224974c93b7e7f (diff)
[msh] add available memory information for free cmd
Diffstat (limited to 'components')
-rw-r--r--components/finsh/msh.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/components/finsh/msh.c b/components/finsh/msh.c
index 7bf0a90f53..22e2cf5389 100644
--- a/components/finsh/msh.c
+++ b/components/finsh/msh.c
@@ -80,9 +80,10 @@ int cmd_free(int argc, char **argv)
rt_size_t total = 0, used = 0, max_used = 0;
rt_memory_info(&total, &used, &max_used);
- rt_kprintf("total : %d\n", total);
- rt_kprintf("used : %d\n", used);
- rt_kprintf("maximum : %d\n", max_used);
+ rt_kprintf("total : %d\n", total);
+ rt_kprintf("used : %d\n", used);
+ rt_kprintf("maximum : %d\n", max_used);
+ rt_kprintf("available: %d\n", total - used);
#endif
return 0;
}