X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/15807bea7353de99396547e065c5d33bbf75ce56..24b8008bb424160e633b1374f54dcd89bdcb9749:/src/surf/surf.c diff --git a/src/surf/surf.c b/src/surf/surf.c index 5be1d870d2..41648deced 100644 --- a/src/surf/surf.c +++ b/src/surf/surf.c @@ -59,6 +59,28 @@ void surf_init(void) if(!maxmin_system) maxmin_system = lmm_system_new(); } +void surf_finalize(void) +{ + int i; + surf_resource_t resource = NULL; + + xbt_dynar_foreach (resource_list,i,resource) { + resource->common_private->finalize(); + } + + if(maxmin_system) { + lmm_system_free(maxmin_system); + maxmin_system = NULL; + } + if(history) { + tmgr_history_free(history); + history = NULL; + } + if(resource_list) xbt_dynar_free(&resource_list); + + tmgr_finalize(); +} + xbt_heap_float_t surf_solve(void) { static int first_run = 1;