Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
leak plug and cosmetics
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 4 Feb 2016 14:14:05 +0000 (15:14 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 4 Feb 2016 14:14:05 +0000 (15:14 +0100)
src/simgrid/host.cpp
src/surf/cpu_interface.cpp
src/surf/host_ptask_L07.cpp

index 94def06..031e452 100644 (file)
@@ -61,15 +61,15 @@ sg_host_t sg_host_by_name_or_create(const char *name)
 
 xbt_dynar_t sg_hosts_as_dynar(void)
 {
 
 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_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 ==============*
 }
 
 // ========= Layering madness ==============*
index 475e236..a857298 100644 (file)
@@ -185,6 +185,8 @@ Cpu::~Cpu()
   }
   if (p_constraintCoreId)
     xbt_free(p_constraintCoreId);
   }
   if (p_constraintCoreId)
     xbt_free(p_constraintCoreId);
+  if (p_speedPeakList)
+    xbt_dynar_free(&p_speedPeakList);
 }
 
 double Cpu::getCurrentPowerPeak()
 }
 
 double Cpu::getCurrentPowerPeak()
index 9197c4d..eab2ddd 100644 (file)
@@ -283,6 +283,7 @@ L07Action::L07Action(Model *model, int host_nb,
     this->setCost(1.0);
     this->setRemains(0.0);
   }
     this->setCost(1.0);
     this->setRemains(0.0);
   }
+  xbt_free(host_list);
 }
 
 Action *NetworkL07Model::communicate(NetCard *src, NetCard *dst,
 }
 
 Action *NetworkL07Model::communicate(NetCard *src, NetCard *dst,
@@ -594,7 +595,7 @@ int L07Action::unref()
   m_refcount--;
   if (!m_refcount) {
     if (action_hook.is_linked())
   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;
     if (getVariable())
       lmm_variable_free(getModel()->getMaxminSystem(), getVariable());
     delete this;