Subversion Repositories Kolibri OS

Rev

Rev 1668 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.  
  2. int cmd_memory(char param[])
  3. {
  4. unsigned total, free, used;
  5.  
  6. total = kol_system_mem();
  7. free = kol_system_memfree();
  8. used = total - free;
  9.  
  10. #if LANG_ENG
  11.         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",
  12. #elif LANG_RUS
  13.         printf ("  Всего        [КБ / МБ / %%]:  %-7d / %-5d / 100\n\r  Свободно     [КБ / МБ / %%]:  %-7d / %-5d / %d\n\r  Используется [КБ / МБ / %%]:  %-7d / %-5d / %d\n\r",
  14. #endif
  15.                 total, total/1024, free, free/1024, (free*100)/total, used, total/1024-free/1024, 100-(free*100)/total );
  16.                
  17. return TRUE;           
  18. }
  19.