memory leak

Jean Brouwers mrjean1ATcomcastDOTnet at no.spam.net
Tue Dec 21 22:02:02 CET 2004


Since you are on Linux, one thing which could be helpful is to lower
the virtual memory limit.  Before running your program, use the Csh
limit command to set the upper limit for vmemory.

If there is a leak in your program or in any of the extensions, it will
run out of memory earlier.  But setting the limit does not help finding
the root cause of a leak.  That requires additional effort and/or
dignostic tools.

/Jean Brouwers


In article <mailman.8199.1103657640.5135.python-list at python.org>,
Daniel Wheeler <daniel.wheeler at nist.gov> wrote:

> I'm on a linux platform and looking in proc/pid/status. Using top shows 
> the same problem.
> 
> I've actually just found the c routine where the memory is leaking by 
> the painstaking process of
> taking the difference between memory consumption before and after each 
> python routine. I guess
> that memory leaks that are not associated with python dangling 
> references are nearly always in the
> underlying c code.
> 
> Also, does anyone know of some good memory diagnostic tools for python, 
> maybe even a GUI.
> I am currently using some pulled from various webpages:
> 
>      http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286222
>      http://www.nightmare.com/medusa/memory-leaks.html
> 
> 
> On Dec 21, 2004, at 12:18 PM, Stephen Kellett wrote:
> 
> > In message <mailman.8186.1103648091.5135.python-list at python.org>, 
> > Daniel Wheeler <daniel.wheeler at nist.gov> writes
> >> However, I would like to understand first if pure python can leak 
> >> without the reference count increasing?
> >
> > How are you determining that used memory is increasing?
> >
> > Stephen
> > -- 
> > Stephen Kellett
> > Object Media Limited    http://www.objmedia.demon.co.uk
> > RSI Information:        http://www.objmedia.demon.co.uk/rsi.html
> > -- 
> > http://mail.python.org/mailman/listinfo/python-list
> >
> >
> >
> -------------------------------------
> Daniel Wheeler
> Telephone: (301) 975-8358
>



More information about the Python-list mailing list