xbt_dynar_t sg_hosts_as_dynar(void)
{
- xbt_dynar_t res = xbt_dynar_new(sizeof(sg_host_t),NULL);
+ xbt_dynar_t res = xbt_dynar_new(sizeof(sg_host_t),NULL);
xbt_dict_cursor_t cursor = nullptr;
const char* name = nullptr;
simgrid::s4u::Host* host = nullptr;
- xbt_dict_foreach(host_list, cursor, name, host)
- if(routing_get_network_element_type(name) == SURF_NETWORK_ELEMENT_HOST)
- xbt_dynar_push(res, &host);
- return res;
+ xbt_dict_foreach(host_list, cursor, name, host)
+ if(routing_get_network_element_type(name) == SURF_NETWORK_ELEMENT_HOST)
+ xbt_dynar_push(res, &host);
+ return res;
}
// ========= Layering madness ==============*
this->setCost(1.0);
this->setRemains(0.0);
}
+ xbt_free(host_list);
}
Action *NetworkL07Model::communicate(NetCard *src, NetCard *dst,
m_refcount--;
if (!m_refcount) {
if (action_hook.is_linked())
- p_stateSet->erase(p_stateSet->iterator_to(*this));
+ p_stateSet->erase(p_stateSet->iterator_to(*this));
if (getVariable())
lmm_variable_free(getModel()->getMaxminSystem(), getVariable());
delete this;