Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
plug a memleak
[simgrid.git] / src / surf / plugins / energy.cpp
index 133f501..a2d14c2 100644 (file)
@@ -49,7 +49,7 @@ In this example, the idle consumption is 95 Watts, 93 Watts and 90 Watts in each
 To change the pstate of a given CPU, use the following functions: #MSG_host_get_nb_pstates(), simgrid#s4u#Host#set_pstate(), #MSG_host_get_power_peak_at().
 
 To simulate the energy-related elements, first call the simgrid#energy#sg_energy_plugin_init() before your #MSG_init(),
-and then use the following function to retrieve the consumption of a given host: #MSG_host_get_consumed_energy().
+and then use the following function to retrieve the consumption of a given host: MSG_host_get_consumed_energy().
  */
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_energy, surf,
@@ -186,6 +186,8 @@ void HostEnergy::initWattsRangeList()
       atof(xbt_dynar_get_as(current_power_values, 0, char*)),
       atof(xbt_dynar_get_as(current_power_values, 1, char*))
     ));
+
+    xbt_dynar_free(&current_power_values);
        }
        xbt_dynar_free(&all_power_values);
 }