always compile mtrace hooks [Linux]

Unless MALLOC_TRACE environment variable is set, no hook is installed
and the calls have no effect. On the other hand, if we compile it
unconditionally, it can be used without need to recompile UltraGrid.
mtrace(), however, doesn't seem to be much helpful (compared to eg.
valgrind).
This commit is contained in:
Martin Pulec
2022-05-12 15:17:35 +02:00
parent 370327357e
commit 57d240dc76

View File

@@ -83,7 +83,7 @@
#define X11_LIB_NAME "libX11.so.6"
#endif
#ifdef USE_MTRACE
#ifdef __linux__
#include <mcheck.h>
#endif
@@ -130,7 +130,7 @@ void common_cleanup(struct init_data *init)
}
delete init;
#ifdef USE_MTRACE
#ifdef __linux__
muntrace();
#endif
@@ -368,7 +368,7 @@ struct init_data *common_preinit(int argc, char *argv[])
open_all("ultragrid_*.so", init->opened_libs); // load modules
}
#ifdef USE_MTRACE
#ifdef __linux__
mtrace();
#endif