A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change malloc/free to new/delete.
[simgrid.git]
/
src
/
smpi
/
colls
/
gather
/
gather-mvapich.cpp
diff --git
a/src/smpi/colls/gather/gather-mvapich.cpp
b/src/smpi/colls/gather/gather-mvapich.cpp
index
7d0a4e3
..
48946ed
100644
(file)
--- a/
src/smpi/colls/gather/gather-mvapich.cpp
+++ b/
src/smpi/colls/gather/gather-mvapich.cpp
@@
-303,12
+303,8
@@
int Coll_gather_mvapich2_two_level::gather(const void *sendbuf,
node_sizes = comm->get_non_uniform_map();
if (leader_comm_rank == leader_root) {
node_sizes = comm->get_non_uniform_map();
if (leader_comm_rank == leader_root) {
- displs = static_cast<int*>(xbt_malloc(sizeof(int) * leader_comm_size));
- recvcnts = static_cast<int*>(xbt_malloc(sizeof(int) * leader_comm_size));
- if (not displs || not recvcnts) {
- mpi_errno = MPI_ERR_OTHER;
- return mpi_errno;
- }
+ displs = new int[leader_comm_size];
+ recvcnts = new int[leader_comm_size];
}
if (root == leader_of_root) {
}
if (root == leader_of_root) {
@@
-342,8
+338,8
@@
int Coll_gather_mvapich2_two_level::gather(const void *sendbuf,
leader_root, leader_comm);
}
if (leader_comm_rank == leader_root) {
leader_root, leader_comm);
}
if (leader_comm_rank == leader_root) {
-
xbt_free(displs)
;
-
xbt_free(recvcnts)
;
+
delete[] displs
;
+
delete[] recvcnts
;
}
}
} else {
}
}
} else {