From: mquinson Date: Thu, 6 Jul 2006 21:38:23 +0000 (+0000) Subject: also save the cbps in SG, the same way I do in RL since a long time. I love calltree X-Git-Tag: v3.3~2859 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/51a5195725c4c524ee5e84d8bab016472a539617?hp=659ba669d7e5726c70f22d33f62efec4f267f994 also save the cbps in SG, the same way I do in RL since a long time. I love calltree git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2499 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/gras/DataDesc/ddt_exchange.c b/src/gras/DataDesc/ddt_exchange.c index 019aa5f901..77915d4c1e 100644 --- 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; - 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(); - 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); - gras_cbps_free(&state); + gras_cbps_reset(state); } CATCH(e) { RETHROW; }