Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix Memleaks
authorPaul Bédaride <paul.bedaride@gmail.com>
Mon, 25 Nov 2013 16:55:51 +0000 (17:55 +0100)
committerPaul Bédaride <paul.bedaride@gmail.com>
Mon, 25 Nov 2013 16:55:51 +0000 (17:55 +0100)
src/instr/instr_interface.c
src/surf/instr_routing.c
src/surf/surf.cpp
src/surf/surf.hpp
src/surf/surf_routing.cpp
src/surf/surf_routing.hpp
src/surf/workstation.cpp
src/surf/workstation.hpp
src/surf/workstation_ptask_L07.cpp
src/surf/workstation_ptask_L07.hpp

index 170ebb1..31be784 100644 (file)
@@ -11,8 +11,6 @@
 #include "surf/surf.h"
 #include "surf/surf_private.h"
 
 #include "surf/surf.h"
 #include "surf/surf_private.h"
 
-//FIXME:#include "surf/network_private.h"
-
 typedef enum {
   INSTR_US_DECLARE,
   INSTR_US_SET,
 typedef enum {
   INSTR_US_DECLARE,
   INSTR_US_SET,
index 35a0118..fd095a1 100644 (file)
@@ -8,7 +8,6 @@
 
 #ifdef HAVE_TRACING
 #include "surf/surf_private.h"
 
 #ifdef HAVE_TRACING
 #include "surf/surf_private.h"
-//FIXME:#include "surf/network_private.h"
 #include "xbt/graph.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_routing, instr, "Tracing platform hierarchy");
 #include "xbt/graph.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_routing, instr, "Tracing platform hierarchy");
index f0230a0..ee63af4 100644 (file)
@@ -667,8 +667,9 @@ Resource::Resource(surf_model_t model, const char *name, xbt_dict_t props)
   : m_name(xbt_strdup(name)), m_properties(props), p_model(model), m_running(true)
 {}
 
   : m_name(xbt_strdup(name)), m_properties(props), p_model(model), m_running(true)
 {}
 
-Resource::Resource(){
-}
+Resource::Resource()
+: m_name(NULL), m_properties(NULL), p_model(NULL)
+{}
 
 const char *Resource::getName()
 {
 
 const char *Resource::getName()
 {
index aaafa54..770c293 100644 (file)
@@ -169,7 +169,7 @@ public:
   Resource(ModelPtr model, const char *name, xbt_dict_t properties);
   virtual ~Resource() {
        xbt_free((void*)m_name);
   Resource(ModelPtr model, const char *name, xbt_dict_t properties);
   virtual ~Resource() {
        xbt_free((void*)m_name);
-       xbt_dict_free(&m_properties);
+    xbt_dict_free(&m_properties);
   };
 
   virtual void updateState(tmgr_trace_event_t event_type, double value, double date)=0;
   };
 
   virtual void updateState(tmgr_trace_event_t event_type, double value, double date)=0;
index 6216697..cb3672c 100644 (file)
@@ -542,7 +542,7 @@ static void _get_route_and_latency(RoutingEdgePtr src, RoutingEdgePtr dst,
   /* Common ancestor is kind enough to declare a bypass route from src to dst -- use it and bail out */
   if (e_route_bypass) {
     xbt_dynar_merge(links, &e_route_bypass->link_list);
   /* Common ancestor is kind enough to declare a bypass route from src to dst -- use it and bail out */
   if (e_route_bypass) {
     xbt_dynar_merge(links, &e_route_bypass->link_list);
-    //FIXME:generic_free_route(e_route_bypass);
+    generic_free_route(e_route_bypass);
     return;
   }
 
     return;
   }
 
index 0f73c60..d0ae19b 100644 (file)
@@ -29,14 +29,6 @@ typedef Onelink *OnelinkPtr;
 class RoutingPlatf;
 typedef RoutingPlatf *RoutingPlatfPtr;
 
 class RoutingPlatf;
 typedef RoutingPlatf *RoutingPlatfPtr;
 
-
-/*FIXME:class RoutingModelDescription {
-  const char *p_name;
-  const char *p_desc;
-  AsPtr create();
-  void end(AsPtr as);
-};*/
-
 struct As {
 public:
   xbt_dynar_t p_indexNetworkElm;
 struct As {
 public:
   xbt_dynar_t p_indexNetworkElm;
index 6703847..ea90f8b 100644 (file)
@@ -10,8 +10,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_workstation, surf,
 
 WorkstationModelPtr surf_workstation_model = NULL;
 
 
 WorkstationModelPtr surf_workstation_model = NULL;
 
-//FIXME:Faire hériter ou composer de cup et network
-
 /*************
  * CallBacks *
  *************/
 /*************
  * CallBacks *
  *************/
index 126757d..8ce487e 100644 (file)
@@ -22,8 +22,8 @@ typedef WorkstationCLM03Lmm *WorkstationCLM03LmmPtr;
 class WorkstationAction;
 typedef WorkstationAction *WorkstationActionPtr;
 
 class WorkstationAction;
 typedef WorkstationAction *WorkstationActionPtr;
 
-/*FIXME:class WorkstationActionLmm;
-typedef WorkstationActionLmm *WorkstationActionLmmPtr;*/
+class WorkstationActionLmm;
+typedef WorkstationActionLmm *WorkstationActionLmmPtr;
 
 /*********
  * Tools *
 
 /*********
  * Tools *
index 3f9e00e..d4d810a 100644 (file)
@@ -257,7 +257,7 @@ ResourcePtr WorkstationL07Model::createResource(const char *name, double /*power
               "Host '%s' declared several times in the platform file.",
               name);
 
               "Host '%s' declared several times in the platform file.",
               name);
 
-  wk = new WorkstationL07(this, name, cpu_properties,
+  wk = new WorkstationL07(this, name, NULL,
                                  static_cast<RoutingEdgePtr>(xbt_lib_get_or_null(host_lib, name, ROUTING_HOST_LEVEL)),
                                  dynamic_cast<CpuPtr>(static_cast<ResourcePtr>(xbt_lib_get_or_null(host_lib, name, SURF_CPU_LEVEL))));
 
                                  static_cast<RoutingEdgePtr>(xbt_lib_get_or_null(host_lib, name, ROUTING_HOST_LEVEL)),
                                  dynamic_cast<CpuPtr>(static_cast<ResourcePtr>(xbt_lib_get_or_null(host_lib, name, SURF_CPU_LEVEL))));
 
index 043404a..19ca986 100644 (file)
@@ -28,9 +28,6 @@ typedef LinkL07 *LinkL07Ptr;
 class WorkstationL07ActionLmm;
 typedef WorkstationL07ActionLmm *WorkstationL07ActionLmmPtr;
 
 class WorkstationL07ActionLmm;
 typedef WorkstationL07ActionLmm *WorkstationL07ActionLmmPtr;
 
-/*FIXME:class WorkstationActionLmm;
-typedef WorkstationActionLmm *WorkstationActionLmmPtr;*/
-
 /*********
  * Tools *
  *********/
 /*********
  * Tools *
  *********/