From da62b18b878d1b98c0c7749a6f68e14b02171df3 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Sat, 18 Nov 2017 18:14:02 +0100 Subject: [PATCH] Use new/delete. --- src/smpi/mpi/smpi_comm.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) 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); -- 2.20.1