Open robertodr opened 6 years ago
How are you running the program? You need to preload the SO file in order for it to intercept the calls.
On linux:
LD_PRELOAD=/path/to/libmemwatch.so your_binary
I was doing just ./c-example
. It actually seems to be a problem with my laptop... It's working (with and without the LD_PRELOAD
) on another machine.
I am trying to use
memwatch
but I can't seem to make it work. This is a pretty simple C example I came up with:I uncommented the
printf
statements inside themalloc
andfree
functions, but when executing this simple program nothing is printed. Using gdb shows that I never actually hit the "tracking"malloc
andfree
implementations. Am I doing something wrong? This is theCMakeLists.txt
I am using (I copy-pasted the header and source file. Very inelegant, I know)