From 4e02e7c217a1ee81dc16c378582697dd5a14de47 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Mon, 10 Nov 2008 11:51:18 -0800 Subject: 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. --- src/python/m5/event.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/python/m5') diff --git a/src/python/m5/event.py b/src/python/m5/event.py index 2b43e578e..ce003defb 100644 --- a/src/python/m5/event.py +++ b/src/python/m5/event.py @@ -36,7 +36,7 @@ mainq = internal.event.cvar.mainEventQueue def create(obj, priority=None): if priority is None: priority = internal.event.Event.Default_Pri - return internal.event.PythonEvent(obj, priority) + return PythonEvent(obj, priority) class Event(PythonEvent): def __init__(self, priority=None): -- cgit v1.2.3