From: alegrand Date: Mon, 10 Sep 2007 09:13:53 +0000 (+0000) Subject: Clean cleanups with mallocators... Thanks Pablo for pointing this out! X-Git-Tag: v3.3~1217 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/208f55a04ebf84bcb18a73f1354db3a87c9a46ce?hp=04b83ff67daf1924db99ae07054ac5d058ed4a19 Clean cleanups with mallocators... Thanks Pablo for pointing this out! git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4143 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/msg/global.c b/src/msg/global.c index eb92d76959..7109a43981 100644 --- a/src/msg/global.c +++ b/src/msg/global.c @@ -231,6 +231,7 @@ MSG_error_t MSG_clean(void) xbt_fifo_free(msg_global->process_list); free(msg_global); + msg_global = NULL; SIMIX_clean(); return MSG_OK; diff --git a/src/simix/smx_global.c b/src/simix/smx_global.c index 046f27504a..311f0abe26 100644 --- a/src/simix/smx_global.c +++ b/src/simix/smx_global.c @@ -163,7 +163,7 @@ void SIMIX_display_process_status(void) free(who); who = who2; xbt_fifo_foreach(p_simdata->cond->actions, item, act, smx_action_t) { - who2 = bprintf("%s '%s'", who, act->name); + who2 = bprintf("%s '%s'(%p)", who, act->name,act); free(who); who = who2; } @@ -294,6 +294,7 @@ void SIMIX_clean(void) xbt_dict_free(&(simix_global->registered_functions)); simix_config_finalize(); free(simix_global); + simix_global = NULL; surf_exit(); return; diff --git a/src/xbt/dict.c b/src/xbt/dict.c index 4422f9d8ce..85748d1c6b 100644 --- a/src/xbt/dict.c +++ b/src/xbt/dict.c @@ -464,7 +464,9 @@ void xbt_dict_dump(xbt_dict_t dict, void xbt_dict_exit(void) { if (dict_mallocator != NULL) { xbt_mallocator_free(dict_mallocator); + dict_mallocator = NULL; xbt_mallocator_free(dict_elm_mallocator); + dict_elm_mallocator = NULL; } } diff --git a/src/xbt/fifo.c b/src/xbt/fifo.c index bf3e61e6fe..84a3ade3bb 100644 --- a/src/xbt/fifo.c +++ b/src/xbt/fifo.c @@ -500,6 +500,7 @@ xbt_fifo_item_t xbt_fifo_getPrevItem(xbt_fifo_item_t i) void xbt_fifo_exit(void) { if (item_mallocator != NULL) { xbt_mallocator_free(item_mallocator); + item_mallocator = NULL; } }