Small change

This commit is contained in:
6arelyFuture 2021-05-31 11:25:58 +02:00
parent 3777d08bf3
commit af11f0330a

View File

@ -64,9 +64,11 @@ void checkStatus(FILE *file, int *currRealMem, int *peakRealMem,
void isProcessWild(int currRealMem, int peakRealMem, void isProcessWild(int currRealMem, int peakRealMem,
int currVirtMem, int peakVirtMem, int ID) int currVirtMem, int peakVirtMem, int ID)
{ {
// Logs to a file in case something is up if (currRealMem <= MAX_MEMORY)
if (currRealMem > MAX_MEMORY)
{ {
return;
}
// Logs to a file in case something is up
FILE *fp; FILE *fp;
fp = fopen("Diavolo.txt", "a"); fp = fopen("Diavolo.txt", "a");
if (fp == NULL) if (fp == NULL)
@ -88,7 +90,6 @@ void isProcessWild(int currRealMem, int peakRealMem,
printf("Error message: %s\n", strerror(errno)); printf("Error message: %s\n", strerror(errno));
} }
} }
}
static int processID[MAX_TRACK_SIZE] = {0}; static int processID[MAX_TRACK_SIZE] = {0};