X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/beff988eff31e8f497a5f64117382fc2dfffe47f..bceb06a3d8d126f6e838a21a4cf876fa87370d66:/src/smpi/internals/smpi_utils.cpp diff --git a/src/smpi/internals/smpi_utils.cpp b/src/smpi/internals/smpi_utils.cpp index 788dac5f24..80ed460a46 100644 --- a/src/smpi/internals/smpi_utils.cpp +++ b/src/smpi/internals/smpi_utils.cpp @@ -146,10 +146,18 @@ void print_memory_analysis() int n = simgrid::config::get_value("smpi/list-leaks"); for (auto const& p : *simgrid::smpi::F2C::lookup()) { static int printed = 0; - if (printed >= n) + if (printed >= n) { + if (n > 0) + XBT_WARN("(more handle leaks hidden as you wanted to see only %d of them)", n); break; + } if (p.first >= simgrid::smpi::F2C::get_num_default_handles()) { - XBT_WARN("Leaked handle of type %s at %p", boost::core::demangle(typeid(*(p.second)).name()).c_str(), p.second); + if (xbt_log_no_loc) { + XBT_WARN("Leaked handle of type %s", boost::core::demangle(typeid(*(p.second)).name()).c_str()); + } else { + XBT_WARN("Leaked handle of type %s at %p", boost::core::demangle(typeid(*(p.second)).name()).c_str(), + p.second); + } printed++; } }