X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6760cb07d6b57be16928d95339d71e57c4e24f36..053352ba13737467be4fc66c9a1c92bd84118bee:/src/surf/surf.c diff --git a/src/surf/surf.c b/src/surf/surf.c index b33f3950fd..a963b61d1e 100644 --- a/src/surf/surf.c +++ b/src/surf/surf.c @@ -8,6 +8,7 @@ #include "surf_private.h" #include "xbt/module.h" +#include "mc/mc.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_kernel, surf, "Logging specific to SURF (kernel)"); @@ -102,7 +103,7 @@ int __surf_is_absolute_file_path(const char *file_path) #endif } -static double NOW = 0; +double NOW = 0; xbt_dynar_t model_list = NULL; tmgr_history_t history = NULL; @@ -252,6 +253,10 @@ XBT_LOG_EXTERNAL_CATEGORY(surf_network_gtnets); void surf_init(int *argc, char **argv) { + + if (_surf_do_model_check) + MC_memory_init(); + /* Connect our log channels: that must be done manually under windows */ XBT_LOG_CONNECT(surf_cpu, surf); XBT_LOG_CONNECT(surf_kernel, surf); @@ -337,7 +342,6 @@ void surf_exit(void) surf_parse_free_callbacks(); xbt_dict_free(&route_table); NOW = 0; /* Just in case the user plans to restart the simulation afterward */ - xbt_exit(); } void surf_presolve(void)