X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/997eaf52ad0ae1eb34820b135c7ba884b2a17f3c..6b188a3ca7fe91cf125a08229fb4fe51eee26e6d:/src/instr/instr_smpi.c diff --git a/src/instr/instr_smpi.c b/src/instr/instr_smpi.c index 8cddd98a46..167b6f50b4 100644 --- a/src/instr/instr_smpi.c +++ b/src/instr/instr_smpi.c @@ -82,7 +82,7 @@ static char *TRACE_smpi_put_key(int src, int dst, char *key, int n) xbt_dynar_t d = xbt_dict_get_or_null(keys, aux); if (d == NULL) { d = xbt_dynar_new(sizeof(char *), &xbt_free_ref); - xbt_dict_set(keys, aux, d, xbt_free); + xbt_dict_set(keys, aux, d, NULL); } //generate the key static unsigned long long counter = 0; @@ -123,7 +123,7 @@ void TRACE_internal_smpi_set_category (const char *category) if (xbt_dict_get_or_null (process_category, processid)) xbt_dict_remove (process_category, processid); if (category != NULL) - xbt_dict_set (process_category, processid, xbt_strdup(category), xbt_free); + xbt_dict_set (process_category, processid, xbt_strdup(category), NULL); } const char *TRACE_internal_smpi_get_category (void) @@ -137,8 +137,8 @@ const char *TRACE_internal_smpi_get_category (void) void TRACE_smpi_alloc() { - keys = xbt_dict_new(); - process_category = xbt_dict_new(); + keys = xbt_dict_new_homogeneous(xbt_free); + process_category = xbt_dict_new_homogeneous(xbt_free); } void TRACE_smpi_start(void) @@ -148,6 +148,8 @@ void TRACE_smpi_start(void) void TRACE_smpi_release(void) { + xbt_dict_free(&keys); + xbt_dict_free(&process_category); if (!TRACE_smpi_is_enabled()) return; TRACE_surf_release();