X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6760cb07d6b57be16928d95339d71e57c4e24f36..900cb23da16eeaad345fd16101f2ea986f2706bd:/src/surf/surf.c diff --git a/src/surf/surf.c b/src/surf/surf.c index b33f3950fd..5b603282d2 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; @@ -251,7 +252,7 @@ XBT_LOG_EXTERNAL_CATEGORY(surf_network_gtnets); #endif void surf_init(int *argc, char **argv) -{ +{ /* Connect our log channels: that must be done manually under windows */ XBT_LOG_CONNECT(surf_cpu, surf); XBT_LOG_CONNECT(surf_kernel, surf); @@ -277,6 +278,9 @@ void surf_init(int *argc, char **argv) history = tmgr_history_new(); surf_config_init(argc, argv); + + if (_surf_do_model_check) + MC_memory_init(); } #ifdef WIN32 @@ -337,7 +341,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)