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
Test comm before cancelation, and kill last leak in this test! \o/
[simgrid.git]
/
examples
/
s4u
/
dht-chord
/
s4u-dht-chord.hpp
diff --git
a/examples/s4u/dht-chord/s4u-dht-chord.hpp
b/examples/s4u/dht-chord/s4u-dht-chord.hpp
index
04f0c22
..
50e7f60
100644
(file)
--- a/
examples/s4u/dht-chord/s4u-dht-chord.hpp
+++ b/
examples/s4u/dht-chord/s4u-dht-chord.hpp
@@
-69,6
+69,8
@@
public:
}
~ChordMessage() = default;
}
~ChordMessage() = default;
+
+ static void destroy(void* message);
};
class Node {
};
class Node {
@@
-159,8
+161,11
@@
public:
}
now = simgrid::s4u::Engine::getClock();
}
}
now = simgrid::s4u::Engine::getClock();
}
- if (data != nullptr) {
- delete static_cast<ChordMessage*>(data);
+ if (comm_receive != nullptr) {
+ if (comm_receive->test())
+ delete static_cast<ChordMessage*>(data);
+ else
+ comm_receive->cancel();
}
// leave the ring
leave();
}
// leave the ring
leave();