WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-bugs

[Xen-bugs] [Bug 1507] memory leak in pyxc_physinfo in xc.c

To: xen-bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-bugs] [Bug 1507] memory leak in pyxc_physinfo in xc.c
From: bugzilla-daemon@xxxxxxxxxxxxxxxxxxx
Date: Tue, 22 Sep 2009 07:30:45 -0700
Delivery-date: Tue, 22 Sep 2009 07:30:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <bug-1507-3@xxxxxxxxxxxxxxxxxxxxxxxxxxx/bugzilla/>
List-help: <mailto:xen-bugs-request@lists.xensource.com?subject=help>
List-id: Xen Bugzilla <xen-bugs.lists.xensource.com>
List-post: <mailto:xen-bugs@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-bugs>, <mailto:xen-bugs-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-bugs>, <mailto:xen-bugs-request@lists.xensource.com?subject=unsubscribe>
Reply-to: bugs@xxxxxxxxxxxxxxxxxx
Sender: xen-bugs-bounces@xxxxxxxxxxxxxxxxxxx
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1507





------- Comment #1 from kingram@xxxxxxxxx  2009-09-22 07:30 -------
Created an attachment (id=877)
 --> (http://bugzilla.xensource.com/bugzilla/attachment.cgi?id=877&action=view)
patch for tools/python/xen/lowlevel/xc/xc.c

I believe this patch fixes the physinfo memory leak. 

It adds calls to Py_DECREF for the lists that get created and added to the
return map (node_to_cpu_obj, cpus, node_to_memory_obj). If their reference
counts are not decremented they never get garbage collected.

I don't have a Xen development environment so it's not fully tested. I made a
standalone version of the function that leaks, stubbing out lower level calls,
and then fixed the reference counting in that.


-- 
Configure bugmail: 
http://bugzilla.xensource.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

_______________________________________________
Xen-bugs mailing list
Xen-bugs@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-bugs

<Prev in Thread] Current Thread [Next in Thread>