From e584d405fed329b0dec77768c090b73a6652c2de Mon Sep 17 00:00:00 2001 From: Santiago Ospina De Los Rios Date: Mon, 7 Oct 2024 15:14:01 +0200 Subject: [PATCH] Add comment regarding detached threads --- memstats.hh | 1 + 1 file changed, 1 insertion(+) diff --git a/memstats.hh b/memstats.hh index 1bc1ad4..e92ffe1 100644 --- a/memstats.hh +++ b/memstats.hh @@ -10,6 +10,7 @@ extern "C" { * Do not call when other threads may call 'new' and 'delete', i.e., make * sure to syncronize all threads before and after calling report. * Do not call during static- or dynamic-initialization phase. + * Reporting from a detached thread is undefined behavior. */ void memstats_report(const char * report_name = "");