I have a program which does 5 mallocs and 3 frees. I call mtrace() at the start and muntrace() at the end. mtrace will report the missing frees if I run the program normally. If I do:
valgrind -v --log-file=val.log --leak-check=full --show-reachable=yes my_program
valgrind will report the missing frees but mtrace will not.
So I guess you can’t use them both together – valgrind will override mtrace?
Correct.
I don’t believe Valgrind overrides
mtrace, but it does overridemallocandfree, somtracesimply never sees eithermallocoffree.