Skip to content
Snippets Groups Projects
Commit 287799ce authored by Christopher Rob Jones's avatar Christopher Rob Jones
Browse files

MemoryAuditor : Only print memory stats if vsize>0

parent 75a155bf
No related branches found
No related tags found
1 merge request!1410ProcStats : Use mutex lock to make fetch() thread safe.
......@@ -48,7 +48,9 @@ void MemoryAuditor::i_printinfo( std::string_view msg, CustomEventTypeRef evt, s
/// Get the process informations.
/// fetch true if it was possible to retrieve the informations.
if ( procInfo pInfo; ProcStats::instance()->fetch( pInfo ) ) {
info() << msg << " " << caller << " " << evt << " virtual size = " << pInfo.vsize << " MB"
<< " resident set size = " << pInfo.rss << " MB" << endmsg;
if ( pInfo.vsize > 0 ) {
info() << msg << " " << caller << " " << evt << " virtual size = " << pInfo.vsize << " MB"
<< " resident set size = " << pInfo.rss << " MB" << endmsg;
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment