mirror of
https://github.com/diamante0018/MonitorRam.git
synced 2025-05-09 14:04:55 +00:00
Mode this at top of file
This commit is contained in:
parent
fcb58a709f
commit
cb0f1d0d8c
14
monitor.c
14
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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user