Changeset 516adce in mainline for uspace/app/top/screen.c


Ignore:
Timestamp:
2010-04-07T10:24:00Z (14 years ago)
Author:
Stanislav Kozina <stanislav.kozina@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
36b5b0f
Parents:
1ba37fa
Message:

top echoes also physical memory overview

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/top/screen.c

    r1ba37fa r516adce  
    4343#include "screen.h"
    4444#include "top.h"
     45#include "func.h"
    4546
    4647int rows;
     
    133134                ++up_rows;
    134135        }
     136}
     137
     138static inline void print_meminfo(data_t *data)
     139{
     140        uint64_t newsize;
     141        char suffix;
     142        order(data->mem_info.total, &newsize, &suffix);
     143        printf("Mem: %8llu %c total", newsize, suffix);
     144        order(data->mem_info.used, &newsize, &suffix);
     145        printf(", %8llu %c used", newsize, suffix);
     146        order(data->mem_info.free, &newsize, &suffix);
     147        printf(", %8llu %c free", newsize, suffix);
    135148}
    136149
     
    182195        ++up_rows;
    183196        print_cpuinfo(data);
     197        print_meminfo(data);
     198        puts("\n");
     199        ++up_rows;
    184200        puts("\n");
    185201        ++up_rows;
Note: See TracChangeset for help on using the changeset viewer.