Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Minor cleanups
[simgrid.git] / src / msg / global.c
index 024d26c..26faad1 100644 (file)
@@ -54,6 +54,10 @@ void MSG_global_init(int *argc, char **argv)
     msg_global->current_process = NULL;
     msg_global->registered_functions = xbt_dict_new();
     msg_global->PID = 1;
+    msg_global->task_mallocator = xbt_mallocator_new(256,
+                                                    (pvoid_f_void_t*) task_mallocator_new_f,
+                                                    (void_f_pvoid_t*) task_mallocator_free_f,
+                                                    (void_f_pvoid_t*) task_mallocator_reset_f);
   }
 }
 
@@ -472,7 +476,7 @@ MSG_error_t MSG_main(void)
   }
 
   if (xbt_fifo_size(msg_global->process_list) == 0) {
-    INFO0("Congratulations ! Simulation terminated : all process are over");
+    INFO0("Congratulations ! Simulation terminated : all processes are over");
     return MSG_OK;
   } else {
     INFO0("Oops ! Deadlock or code not perfectly clean.");
@@ -540,6 +544,7 @@ MSG_error_t MSG_clean(void)
   xbt_fifo_free(msg_global->process_to_run);
   xbt_fifo_free(msg_global->process_list);
   xbt_dict_free(&(msg_global->registered_functions));
+  xbt_mallocator_free(msg_global->task_mallocator);
 
   if(msg_global->paje_output) {
     fclose(msg_global->paje_output);