From cb0f1d0d8cfc62c824824a419d5183ac48c7137e Mon Sep 17 00:00:00 2001 From: Diavolo Date: Sun, 19 Jun 2022 17:31:49 +0200 Subject: [PATCH] Mode this at top of file --- monitor.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/monitor.c b/monitor.c index df06301..974f673 100644 --- a/monitor.c +++ b/monitor.c @@ -13,6 +13,13 @@ #define MAX_MEMORY 1048576 #define MAX_TRACK_SIZE 30 +struct process_monitor { + int id; + int active; +}; + +static struct process_monitor processes[MAX_TRACK_SIZE]; + FILE* popen(const char* command, const char* type); int pclose(FILE* stream); char* strerror(int errnum); @@ -99,13 +106,6 @@ static int is_process_wild(int curr_real_mem, int peak_real_mem, return 1; } -struct process_monitor { - int id; - int active; -}; - -static struct process_monitor processes[MAX_TRACK_SIZE]; - int setup(const char* pid) { char* command = va("pgrep %s", pid); FILE* file = popen(command, "r");