* under the terms of the license (GNU LGPL) which comes with this package. */
#include "xbt/ex.h"
+#include "xbt/str.h"
#include "xbt/dict.h"
#include "surf_private.h"
/* extern lmm_system_t maxmin_system; */
int nb_host = 0;
double latency = 0.0;
- if (parallel_task_link_set == NULL) {
- parallel_task_link_set =
- xbt_dict_new_ext(workstation_nb * workstation_nb * 10);
- }
+ if (parallel_task_link_set == NULL)
+ parallel_task_link_set = xbt_dict_new();
xbt_dict_reset(parallel_task_link_set);
char* name;
if (src_id != -1 && dst_id != -1) {
name = bprintf("%x#%x",src_id, dst_id);
-
manage_route(route_table, name, route_action, 0);
free(name);
}
char *key,*data, *end;
const char *sep = "#";
xbt_dynar_t links, keys;
+ char* link = NULL;
if (routing_table == NULL) create_routing_table();
link_list_capacity = xbt_dynar_length(links);
link_list = xbt_new(link_L07_t, link_list_capacity);
- char* link = NULL;
+
xbt_dynar_foreach (links, cpt, link) {
TRY {
link_list[nb_link++] = xbt_dict_get(link_set, link);
}
}
route_new(src_id, dst_id, link_list, nb_link);
- xbt_dynar_free(&links);
}
xbt_dict_free(&route_table);
surf_workstation_model->common_public->get_properties = get_properties;
- workstation_set = xbt_dict_new_ext(1024);
- link_set = xbt_dict_new_ext(1024);
+ workstation_set = xbt_dict_new();
+ link_set = xbt_dict_new();
if (!ptask_maxmin_system)
ptask_maxmin_system = lmm_system_new();