diff --git a/plugin/cpp/networkplugin.cpp b/plugin/cpp/networkplugin.cpp index df4a6a38f9ecd49ed5133d39b670f584b69b831a..c17adb7fb3d2983afe01b952ac81a46b9b4f3aeb 100644 --- a/plugin/cpp/networkplugin.cpp +++ b/plugin/cpp/networkplugin.cpp @@ -587,13 +587,18 @@ void NetworkPlugin::sendMemoryUsage() { pbnetwork::Stats stats; stats.set_init_res(m_init_res); - double res; - double shared; + double res = 0; + double shared = 0; #ifndef WIN32 process_mem_usage(shared, res); #endif - stats.set_res(res); - stats.set_shared(shared); + + double e_res; + double e_shared; + handleMemoryUsage(e_res, e_shared); + + stats.set_res(res + e_res); + stats.set_shared(shared + e_shared); std::string message; stats.SerializeToString(&message);