Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[ci-skip] we want to order by the largest first ..
authorAugustin Degomme <adegomme@users.noreply.github.com>
Fri, 9 Apr 2021 17:24:33 +0000 (19:24 +0200)
committerAugustin Degomme <adegomme@users.noreply.github.com>
Fri, 9 Apr 2021 17:25:13 +0000 (19:25 +0200)
src/smpi/internals/smpi_utils.cpp

index cec9084..1843467 100644 (file)
@@ -201,7 +201,7 @@ void print_memory_analysis()
                "Running smpirun with -wrapper \"valgrind --leak-check=full\" can provide more information",
                leaks.size());
       if (max > 0) {
-        std::sort(leaks.begin(), leaks.end(), [](auto const& a, auto const& b) { return a.second.size < b.second.size; });
+        std::sort(leaks.begin(), leaks.end(), [](auto const& a, auto const& b) { return a.second.size > b.second.size; });
         bool truncate = max < leaks.size();
         if (truncate)
           leaks.resize(max);