Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Now it works (if you don't look at the leaks)
[simgrid.git] / src / surf / instr_routing.cpp
index 0b46803..ed9411b 100644 (file)
@@ -120,8 +120,8 @@ static void linkContainers (container_t src, container_t dst, xbt_dict_t filter)
   snprintf (key, INSTR_DEFAULT_STR_SIZE, "%lld", counter);
   counter++;
 
-  StartLinkEvent(SIMIX_get_clock(), father, link_type, src, "topology", key);
-  EndLinkEvent(SIMIX_get_clock(), father, link_type, dst, "topology", key);
+  new StartLinkEvent(SIMIX_get_clock(), father, link_type, src, "topology", key);
+  new EndLinkEvent(SIMIX_get_clock(), father, link_type, dst, "topology", key);
 
   XBT_DEBUG ("  linkContainers %s <-> %s", src->name, dst->name);
 }
@@ -223,8 +223,8 @@ static void instr_routing_parse_start_link(simgrid::s4u::Link& link)
     if (latency == nullptr) {
       latency = PJ_type_variable_new("latency", nullptr, container->type);
     }
-    SetVariableEvent(0, container, bandwidth, bandwidth_value);
-    SetVariableEvent(0, container, latency, latency_value);
+    new SetVariableEvent(0, container, bandwidth, bandwidth_value);
+    new SetVariableEvent(0, container, latency, latency_value);
   }
   if (TRACE_uncategorized()) {
     type_t bandwidth_used = PJ_type_get_or_null("bandwidth_used", container->type);
@@ -246,7 +246,7 @@ void sg_instr_new_host(simgrid::s4u::Host& host)
     }
 
     double current_speed_state = host.speed();
-    SetVariableEvent (0, container, speed, current_speed_state);
+    new SetVariableEvent (0, container, speed, current_speed_state);
   }
   if (TRACE_uncategorized()){
     type_t speed_used = PJ_type_get_or_null ("power_used", container->type);