Jiri Denemark
2009-Sep-29 16:54 UTC
[Xen-devel] [PATCH] Fix memory leaks in libxc python bindings
Hi, Reference counters are not correctly decreased for python object in several places in python bindings for libxc. Most of them are around PyList_Append(), which unlike PyList_SetItem() does increment reference counter of the object being added to a list. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Konrad Rzeszutek Wilk
2009-Sep-29 17:00 UTC
Re: [Xen-devel] [PATCH] Fix memory leaks in libxc python bindings
On Tue, Sep 29, 2009 at 06:54:09PM +0200, Jiri Denemark wrote:> Hi, > > Reference counters are not correctly decreased for python object in severalI am curious how did you find this? Is there a python ''valgrind'' that can help track this? Or is there a python flag to be report such abnormalities? _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jiri Denemark
2009-Sep-29 19:18 UTC
Re: [Xen-devel] [PATCH] Fix memory leaks in libxc python bindings
> > Reference counters are not correctly decreased for python object in several > > I am curious how did you find this? Is there a python ''valgrind'' that > can help track this? Or is there a python flag to be report such abnormalities?None that I know of. I just used the source code. I found it because long running xend managed by libvirt was consuming increasing amount of memory. From the only repeatedly executed command virsh list I got to xm info and xc_physinfo(). And then I just looked for all other calls to PyDict_* and PyList_Append and fixed them. Jirka _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel