From 57d240dc76cec8cfd7b3311274a6ac60d877de8b Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Thu, 12 May 2022 15:17:35 +0200 Subject: [PATCH] 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). --- src/host.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/host.cpp b/src/host.cpp index c3b08529b..3edbe186f 100644 --- a/src/host.cpp +++ b/src/host.cpp @@ -83,7 +83,7 @@ #define X11_LIB_NAME "libX11.so.6" #endif -#ifdef USE_MTRACE +#ifdef __linux__ #include #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