X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/05c1f36a7de4ea6a2f757b0e48de8231d3a49c30..4c542c0fc6507f1da7c21d208779a7c035ddb302:/src/surf/surf.c diff --git a/src/surf/surf.c b/src/surf/surf.c index fbd51c2015..8c3be87c0d 100644 --- a/src/surf/surf.c +++ b/src/surf/surf.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011. The SimGrid Team. +/* Copyright (c) 2004-2013. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -401,7 +401,7 @@ void surf_init(int *argc, char **argv) as_router_lib = xbt_lib_new(); storage_lib = xbt_lib_new(); storage_type_lib = xbt_lib_new(); - watched_hosts_lib = xbt_dict_new(); + watched_hosts_lib = xbt_dict_new_homogeneous(NULL); XBT_DEBUG("Add routing levels"); ROUTING_HOST_LEVEL = xbt_lib_add_level(host_lib,routing_asr_host_free); @@ -466,6 +466,11 @@ void surf_exit(void) unsigned int iter; surf_model_t model = NULL; +#ifdef HAVE_TRACING + TRACE_end(); /* Just in case it was not called by the upper + * layer (or there is no upper layer) */ +#endif + sg_config_finalize(); xbt_dynar_foreach(model_list, iter, model) @@ -488,7 +493,7 @@ void surf_exit(void) xbt_free(surf_mins); surf_mins = NULL; #endif - if(host_that_restart)xbt_dynar_free(&host_that_restart); + xbt_dynar_free(&host_that_restart); xbt_dynar_free(&surf_path); xbt_lib_free(&host_lib);