[msh] add available memory information for free cmd

This commit is contained in:
Meco Man 2022-07-06 12:07:17 -04:00 committed by guo
parent 3f0934feb7
commit b01c2b8a5a
1 changed files with 4 additions and 3 deletions

View File

@ -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;
}