kolibrios/programs/system/shell/cmd/cmd_free.c
Nasarus 3256dedea8 Shell 0.4.4 (All)
git-svn-id: svn://kolibrios.org@1665 a494cfbc-eb01-0410-851d-a64ba20cac60
2010-10-17 19:50:55 +00:00

15 lines
427 B
C

int cmd_free(char param[])
{
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 );
return TRUE;
}