X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9cca09ad88fcaeb49f2637de97df519c3920aaa4..ec28fefa54873e9f38f7005c4ab6d0028f69fa99:/src/surf/trace_mgr.hpp diff --git a/src/surf/trace_mgr.hpp b/src/surf/trace_mgr.hpp index b6877723b2..955ff2a041 100644 --- a/src/surf/trace_mgr.hpp +++ b/src/surf/trace_mgr.hpp @@ -7,8 +7,8 @@ #define SURF_TMGR_H #include "simgrid/forward.h" -#include "xbt/heap.h" #include "xbt/sysdep.h" +#include #include extern "C" { @@ -18,7 +18,7 @@ struct s_tmgr_trace_event_t { tmgr_trace_t trace; unsigned int idx; sg_resource_t resource; - int free_me; + bool free_me; }; typedef s_tmgr_trace_event_t* tmgr_trace_event_t; @@ -91,8 +91,8 @@ public: tmgr_trace_event_t add_trace(tmgr_trace_t trace, simgrid::surf::Resource * resource); private: - // TODO: use a boost type for the heap (or a ladder queue) - xbt_heap_t heap_ = xbt_heap_new(8, xbt_free_f); /* Content: only trace_events (yep, 8 is an arbitrary value) */ + typedef std::pair Qelt; + std::priority_queue, std::greater> heap_; }; }} // namespace simgrid::trace_mgr