Skip to content

Commit

Permalink
Add environment variable NANO_MEMORY_INTENSIVE to explicitly enable/d…
Browse files Browse the repository at this point in the history
…isable 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.
  • Loading branch information
clemahieu authored May 23, 2024
1 parent e9adb74 commit c16f020
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nano/lib/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ bool running_within_valgrind ()

bool memory_intensive_instrumentation ()
{
auto env = nano::env::get<bool> ("NANO_MEMORY_INTENSIVE");
if (env)
{
return env.value ();
}
return is_tsan_build () || nano::running_within_valgrind ();
}

Expand Down

0 comments on commit c16f020

Please sign in to comment.