kolibrios-gitea/programs/system/shell/cmd_free.c
Kirill Lipatov (Leency) 939f824d96 Shell 0.4 from Albom
git-svn-id: svn://kolibrios.org@959 a494cfbc-eb01-0410-851d-a64ba20cac60
2008-12-14 11:55:46 +00:00

13 lines
396 B
C

void cmd_free()
{
unsigned total, free, used;
total = kol_system_mem();
free = kol_system_memfree();
used = total - free;
printf (" total [kB / MB / %%]: %-7d / %-5d / 100\n\r free [kB / MB / %%]: %-7d / %-5d / %d\n\r used [kB / MB / %%]: %-7d / %-5d / %d\n\r",
total, total/1024, free, free/1024, (free*100)/total, used, total/1024-free/1024, 100-(free*100)/total );
}