summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2008-11-10 11:51:18 -0800
committerNathan Binkert <nate@binkert.org>2008-11-10 11:51:18 -0800
commit4e02e7c217a1ee81dc16c378582697dd5a14de47 (patch)
tree6d39beaabb1df252632af16931827544aab44480 /src/sim
parent1adfe5c7f3368c4225ff685ddcd66b6280c7599f (diff)
downloadgem5-4e02e7c217a1ee81dc16c378582697dd5a14de47.tar.xz
python: Fix the reference counting for python events placed on the eventq.
We need to add a reference when an object is put on the C++ queue, and remove a reference when the object is removed from the queue. This was not happening before and caused a memory problem.
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/eventq.hh6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sim/eventq.hh b/src/sim/eventq.hh
index 2db652b54..281df2dc3 100644
--- a/src/sim/eventq.hh
+++ b/src/sim/eventq.hh
@@ -299,9 +299,9 @@ class EventQueue : public Serializable
virtual const std::string name() const { return objName; }
// schedule the given event on this queue
- void schedule(Event *ev, Tick when);
- void deschedule(Event *ev);
- void reschedule(Event *ev, Tick when, bool always = false);
+ void schedule(Event *event, Tick when);
+ void deschedule(Event *event);
+ void reschedule(Event *event, Tick when, bool always = false);
Tick nextTick() const { return head->when(); }
Event *serviceOne();