X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/eee21ec5f99218189fc98898a09150294cd0fbf4..52089b08b629d77bce06104b92bf99fecaf0349b:/src/surf/surf.hpp diff --git a/src/surf/surf.hpp b/src/surf/surf.hpp index 2afb2cee83..c88ca70b05 100644 --- a/src/surf/surf.hpp +++ b/src/surf/surf.hpp @@ -6,11 +6,9 @@ #include #include #include +#include #include -#include #include -#include -#include #include "surf/trace_mgr.h" #include "xbt/lib.h" #include "surf/surf_routing.h" @@ -169,7 +167,10 @@ class Resource { public: Resource(); Resource(ModelPtr model, const char *name, xbt_dict_t properties); - virtual ~Resource() {}; + virtual ~Resource() { + xbt_free((void*)m_name); + xbt_dict_free(&m_properties); + }; virtual void updateState(tmgr_trace_event_t event_type, double value, double date)=0; @@ -204,7 +205,7 @@ private: class ResourceLmm: virtual public Resource { public: - ResourceLmm() {}; + ResourceLmm() { p_power.event = NULL; }; ResourceLmm(surf_model_t model, const char *name, xbt_dict_t props, lmm_system_t system, double constraint_value, @@ -299,10 +300,14 @@ public: ActionLmm() : m_suspended(false) { p_actionListHookup.prev = 0; p_actionListHookup.next = 0; + m_lastUpdate = 0; + m_lastValue = 0; }; - ActionLmm(ModelPtr model, double cost, bool failed) : m_suspended(false) { + ActionLmm(ModelPtr /*model*/, double /*cost*/, bool /*failed*/) : m_suspended(false) { p_actionListHookup.prev = 0; p_actionListHookup.next = 0; + m_lastUpdate = 0; + m_lastValue = 0; }; virtual void updateRemainingLazy(double now);