From: Arran Cudbard-Bell Date: Wed, 27 Apr 2022 19:47:27 +0000 (-0500) Subject: Emscripten provides mallopt, but not the same knobs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e43238c2f2a475862fb2732837aeba420072f68;p=thirdparty%2Ffreeradius-server.git Emscripten provides mallopt, but not the same knobs --- diff --git a/src/lib/util/debug.c b/src/lib/util/debug.c index 25c822ebbc2..753873887a7 100644 --- a/src/lib/util/debug.c +++ b/src/lib/util/debug.c @@ -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)