/* * main.c * Copyright (C) 2021 light * * Distributed under terms of the MIT license. */ #include #include"./include/test.h" #include #include #define MAX_LINE 1024 struct memGlobal { unsigned int All; float Useage; unsigned int Free; } memG; struct cpuGlobal { float Useage; } cpuG; struct process { char Name[128]; unsigned id; float cpu; float mem; } pList[1024]; int main() { updateMem(&memG.All, &memG.Free, &memG.Useage); printf("mem: all %u free: %u usage: %f\n", memG.All, memG.Free, memG.Useage); return 0; }