]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Emscripten provides mallopt, but not the same knobs
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 27 Apr 2022 19:47:27 +0000 (14:47 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 27 Apr 2022 20:32:27 +0000 (15:32 -0500)
src/lib/util/debug.c

index 25c822ebbc217cff809ce93a1dd1c683aae1b21c..753873887a7666dd7022d10bb5d132d9cd9020e7 100644 (file)
@@ -1304,8 +1304,12 @@ int fr_fault_setup(TALLOC_CTX *ctx, char const *cmd, char const *program)
                 *  uninitialised and freed memory, to make memory issues easier
                 *  to track down.
                 */
+#  ifdef M_PERTURB
                if (!getenv("TALLOC_FREE_FILL")) mallopt(M_PERTURB, 0x42);
+#  endif
+#  ifdef M_CHECK_ACTION
                mallopt(M_CHECK_ACTION, 3);
+#  endif
 #endif
 
 #if defined(HAVE_EXECINFO) && defined(__GNUC__) && !defined(NDEBUG)