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
Replace some malloc/free by C++ new/delete.
[simgrid.git]
/
src
/
mc
/
mc_smx.cpp
diff --git
a/src/mc/mc_smx.cpp
b/src/mc/mc_smx.cpp
index
4711074
..
72b087c
100644
(file)
--- a/
src/mc/mc_smx.cpp
+++ b/
src/mc/mc_smx.cpp
@@
-66,7
+66,7
@@
static void MC_process_refresh_simix_actor_dynar(simgrid::mc::RemoteClient* proc
s_xbt_dynar_t dynar;
process->read_bytes(&dynar, sizeof(dynar), remote_dynar);
s_xbt_dynar_t dynar;
process->read_bytes(&dynar, sizeof(dynar), remote_dynar);
- smx_actor_t* data =
(smx_actor_t*)malloc(dynar.elmsize * dynar.used
);
+ smx_actor_t* data =
static_cast<smx_actor_t*>(::operator new(dynar.elmsize * dynar.used)
);
process->read_bytes(data, dynar.elmsize * dynar.used, dynar.data);
// Load each element of the vector from the MCed process:
process->read_bytes(data, dynar.elmsize * dynar.used, dynar.data);
// Load each element of the vector from the MCed process:
@@
-78,7
+78,7
@@
static void MC_process_refresh_simix_actor_dynar(simgrid::mc::RemoteClient* proc
process->read_bytes(&info.copy, sizeof(info.copy), remote(data[i]));
target.push_back(std::move(info));
}
process->read_bytes(&info.copy, sizeof(info.copy), remote(data[i]));
target.push_back(std::move(info));
}
-
fre
e(data);
+
::operator delet
e(data);
}
namespace simgrid {
namespace mc {
}
namespace simgrid {
namespace mc {