X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b4b78f6684f68475ec9c7b63af21f733ff04a435..5a5e8338f6d18da29438ec26f96970afb7579992:/src/surf/surf_interface.cpp diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index 4b1889a43c..0c117abd5d 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -370,6 +370,11 @@ static XBT_INLINE void surf_workstation_free(void *r) delete static_cast(r); } +static XBT_INLINE void surf_storage_free(void *r) +{ + delete static_cast(r); +} + void sg_version(int *ver_major,int *ver_minor,int *ver_patch) { *ver_major = SIMGRID_VERSION_MAJOR; @@ -385,6 +390,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(); + file_lib = xbt_lib_new(); watched_hosts_lib = xbt_dict_new_homogeneous(NULL); XBT_DEBUG("Add routing levels"); @@ -396,6 +402,7 @@ void surf_init(int *argc, char **argv) SURF_CPU_LEVEL = xbt_lib_add_level(host_lib,surf_cpu_free); SURF_WKS_LEVEL = xbt_lib_add_level(host_lib,surf_workstation_free); SURF_LINK_LEVEL = xbt_lib_add_level(link_lib,surf_link_free); + SURF_STORAGE_LEVEL = xbt_lib_add_level(storage_lib,surf_storage_free); xbt_init(argc, argv); if (!model_list) @@ -436,7 +443,7 @@ void surf_exit(void) xbt_lib_free(&as_router_lib); xbt_lib_free(&storage_lib); xbt_lib_free(&storage_type_lib); - + xbt_lib_free(&file_lib); xbt_dict_free(&watched_hosts_lib); xbt_dynar_foreach(model_list, iter, model)