From: Arnaud Giersch Date: Sat, 18 Nov 2017 17:14:02 +0000 (+0100) Subject: Use new/delete. X-Git-Tag: v3.18~242^2~15 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/da62b18b878d1b98c0c7749a6f68e14b02171df3 Use new/delete. --- diff --git a/src/smpi/mpi/smpi_comm.cpp b/src/smpi/mpi/smpi_comm.cpp index 2416e66ac4..4998ea0c11 100644 --- a/src/smpi/mpi/smpi_comm.cpp +++ b/src/smpi/mpi/smpi_comm.cpp @@ -263,7 +263,7 @@ void Comm::cleanup_smp(){ if (non_uniform_map_ != nullptr) xbt_free(non_uniform_map_); if (leaders_map_ != nullptr) - xbt_free(leaders_map_); + delete[] leaders_map_; } void Comm::unref(Comm* comm){ @@ -332,11 +332,10 @@ void Comm::init_smp(){ MPI_Comm comm_intra = new Comm(group_intra, nullptr); leader=min_index; - int * leaders_map= static_cast(xbt_malloc0(sizeof(int)*comm_size)); - int * leader_list= static_cast(xbt_malloc0(sizeof(int)*comm_size)); - for(i=0; iset_replaying(true);