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
[mc] Use RAII std::vector for s_mc_comm_pattern::data
[simgrid.git]
/
src
/
mc
/
mc_comm_pattern.h
diff --git
a/src/mc/mc_comm_pattern.h
b/src/mc/mc_comm_pattern.h
index
1fd9774
..
fb3de15
100644
(file)
--- a/
src/mc/mc_comm_pattern.h
+++ b/
src/mc/mc_comm_pattern.h
@@
-11,6
+11,7
@@
#include <cstring>
#include <string>
#include <cstring>
#include <string>
+#include <vector>
#include <simgrid_config.h>
#include <xbt/dynar.h>
#include <simgrid_config.h>
#include <xbt/dynar.h>
@@
-32,8
+33,7
@@
typedef struct s_mc_comm_pattern{
const char *src_host = nullptr;
const char *dst_host = nullptr;
std::string rdv;
const char *src_host = nullptr;
const char *dst_host = nullptr;
std::string rdv;
- ssize_t data_size = 0;
- void *data = nullptr;
+ std::vector<char> data;
int tag = 0;
int index = 0;
int tag = 0;
int index = 0;
@@
-41,10
+41,6
@@
typedef struct s_mc_comm_pattern{
{
std::memset(&comm_addr, 0, sizeof(comm_addr));
}
{
std::memset(&comm_addr, 0, sizeof(comm_addr));
}
- ~s_mc_comm_pattern()
- {
- xbt_free(this->data);
- }
// No copy:
s_mc_comm_pattern(s_mc_comm_pattern const&) = delete;
// No copy:
s_mc_comm_pattern(s_mc_comm_pattern const&) = delete;