SIMIX_clean();
- // Exit the LIB host_lib
- xbt_lib_free(&host_lib);
- xbt_lib_free(&link_lib);
- xbt_lib_free(&as_router_lib);
-
return MSG_OK;
}
XBT_DEBUG("Exiting Surf...");
surf_exit();
- // Exit the LIB host_lib
- xbt_lib_free(&host_lib);
- xbt_lib_free(&link_lib);
- xbt_lib_free(&as_router_lib);
-
xbt_free(sd_global);
sd_global = NULL;
if (surf_path)
xbt_dynar_free(&surf_path);
+ xbt_lib_free(&host_lib);
+ xbt_lib_free(&link_lib);
+ xbt_lib_free(&as_router_lib);
+
tmgr_finalize();
surf_parse_lex_destroy();
surf_parse_free_callbacks();
+
NOW = 0; /* Just in case the user plans to restart the simulation afterward */
}
static void _dynar_map(const xbt_dynar_t dynar, void_f_pvoid_t const op)
{
- char elm[SIZEOF_MAX];
+ char *const data = (char *) dynar->data;
+ const unsigned long elmsize = dynar->elmsize;
const unsigned long used = dynar->used;
- unsigned long i = 0;
+ unsigned long i;
for (i = 0; i < used; i++) {
- _xbt_dynar_get_elm(elm, dynar, i);
+ char* elm = (char*) data + i * elmsize;
(*op) (elm);
}
}
#include "gras_stub_generator.h"
#include <stdarg.h>
-
-
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(stubgen, gras, "Stub generator");
-
#ifdef _XBT_WIN32
#include <windows.h>
#endif
#endif
free(warning);
+
+ xbt_dict_free(&process_function_set);
+ xbt_dynar_free(&process_list);
+ xbt_dict_free(&machine_set);
surf_exit();
+
return 0;
}