From c16f020af4124762d0187a8950f8146d00cb1adc Mon Sep 17 00:00:00 2001 From: clemahieu Date: Thu, 23 May 2024 13:54:44 +0100 Subject: [PATCH] Add environment variable NANO_MEMORY_INTENSIVE to explicitly enable/disable the memory_intensive_instrumentation check. (#4640) running_within_valgrind doesn't always play well with arm and there may be other reasons to enable/disable this option. --- nano/lib/config.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nano/lib/config.cpp b/nano/lib/config.cpp index 0674e605f7..df922fcc07 100644 --- a/nano/lib/config.cpp +++ b/nano/lib/config.cpp @@ -253,6 +253,11 @@ bool running_within_valgrind () bool memory_intensive_instrumentation () { + auto env = nano::env::get ("NANO_MEMORY_INTENSIVE"); + if (env) + { + return env.value (); + } return is_tsan_build () || nano::running_within_valgrind (); }