X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/120df14075aaab1a27d234cd170cff2b4f7df071..016507e2f9575c2ee41587803bf3c6cecbde99a0:/src/smpi/internals/instr_smpi.cpp diff --git a/src/smpi/internals/instr_smpi.cpp b/src/smpi/internals/instr_smpi.cpp index 504f43c835..9c43bde030 100644 --- a/src/smpi/internals/instr_smpi.cpp +++ b/src/smpi/internals/instr_smpi.cpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2010-2018. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2010-2018. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -16,6 +15,8 @@ #include #include +#include "src/smpi/include/smpi_actor.hpp" + XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_smpi, instr, "Tracing SMPI"); static std::unordered_map*> keys; @@ -137,6 +138,10 @@ static std::string TRACE_smpi_get_key(int src, int dst, int tag, int send) } else { key = it->second->front(); it->second->pop_front(); + if (it->second->empty()) { + delete it->second; + keys.erase(it); + } } return key; }