On Mon, 2015-08-31 at 13:04 +0100, Wei Liu wrote:
> On Fri, Aug 28, 2015 at 05:35:18PM -0400, Zhigang Wang wrote:
> > Python PyList_Append() will increase reference count of the item. We 
> > have to
> > decrease its reference count to let it garbage collected.
> > 
> > We missed the Py_DECREF() for 'cpuinfo_obj' here, thus we have a memory 
> > leak.
> > 
> > The memory leak could be easily confirmed by:
> > 
> >   # python
> >   >>> import xen.lowlevel.xc
> >   >>> xc = xen.lowlevel.xc.xc()
> >   >>> for i in range(1000): xc.getcpuinfo(1)
> > 
> > And check the python process memory usage before and after:
> > 
> >   # ps f -o vsize,rss,%mem,size,cmd -p <pid>
> > 
> > Signed-off-by: Zhigang Wang <zhigang.x.w...@oracle.com>
> 
> Acked-by: Wei Liu <wei.l...@citrix.com>

Applied.



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to