I'm a C programming student trying to find a way to detect memory leaks on MacOs Mojave.
I know about the existence of Valgrind, but it doesn't support current MacOs releases. After installing Apple Command Line Tools, I tried to run my C program with leaks tool but it doesn´t work... Running this very simple C program:
#include <stdio.h>
int main(int argc, char const *argv[]) {
printf("Hello World\n");
return 0;
}
Like this:
leaks ./a.out
This is the output:
leaks[875]: [fatal] unable to read input graph: The data
couldn’t be read because it isn’t in the correct format.
I don´t understand why this happens... How can I use the leaks tool?