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
also save the cbps in SG, the same way I do in RL since a long time. I love calltree
[simgrid.git]
/
src
/
gras
/
DataDesc
/
ddt_exchange.c
diff --git
a/src/gras/DataDesc/ddt_exchange.c
b/src/gras/DataDesc/ddt_exchange.c
index
019aa5f
..
77915d4
100644
(file)
--- a/
src/gras/DataDesc/ddt_exchange.c
+++ b/
src/gras/DataDesc/ddt_exchange.c
@@
-369,21
+369,22
@@
gras_datadesc_copy_rec(gras_cbps_t state,
int gras_datadesc_copy(gras_datadesc_type_t type,
void *src, void *dst) {
xbt_ex_t e;
int gras_datadesc_copy(gras_datadesc_type_t type,
void *src, void *dst) {
xbt_ex_t e;
-
gras_cbps_t state
;
+
static gras_cbps_t state=NULL
;
xbt_dict_t refs; /* all references already sent */
int size=0;
xbt_assert0(type,"called with NULL type descriptor");
refs = xbt_dict_new();
xbt_dict_t refs; /* all references already sent */
int size=0;
xbt_assert0(type,"called with NULL type descriptor");
refs = xbt_dict_new();
- state = gras_cbps_new();
+ if (!state)
+ state = gras_cbps_new();
TRY {
size = gras_datadesc_copy_rec(state,refs,type,(char*)src,(char*)dst,0,
type->cycle);
} CLEANUP {
xbt_dict_free(&refs);
TRY {
size = gras_datadesc_copy_rec(state,refs,type,(char*)src,(char*)dst,0,
type->cycle);
} CLEANUP {
xbt_dict_free(&refs);
- gras_cbps_
free(&
state);
+ gras_cbps_
reset(
state);
} CATCH(e) {
RETHROW;
}
} CATCH(e) {
RETHROW;
}