Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Clean cleanups with mallocators... Thanks Pablo for pointing this out!
authoralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 10 Sep 2007 09:13:53 +0000 (09:13 +0000)
committeralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 10 Sep 2007 09:13:53 +0000 (09:13 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4143 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/msg/global.c
src/simix/smx_global.c
src/xbt/dict.c
src/xbt/fifo.c

index eb92d76..7109a43 100644 (file)
@@ -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;
index 046f275..311f0ab 100644 (file)
@@ -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;
index 4422f9d..85748d1 100644 (file)
@@ -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;
   }
 }
 
index bf3e61e..84a3ade 100644 (file)
@@ -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;
   }
 }