Skip to content

Commit b01c2b8

Browse files
mysterywolfGuozhanxin
authored andcommitted
[msh] add available memory information for free cmd
1 parent 3f0934f commit b01c2b8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

components/finsh/msh.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,10 @@ int cmd_free(int argc, char **argv)
8080
rt_size_t total = 0, used = 0, max_used = 0;
8181

8282
rt_memory_info(&total, &used, &max_used);
83-
rt_kprintf("total : %d\n", total);
84-
rt_kprintf("used : %d\n", used);
85-
rt_kprintf("maximum : %d\n", max_used);
83+
rt_kprintf("total : %d\n", total);
84+
rt_kprintf("used : %d\n", used);
85+
rt_kprintf("maximum : %d\n", max_used);
86+
rt_kprintf("available: %d\n", total - used);
8687
#endif
8788
return 0;
8889
}

0 commit comments

Comments
 (0)