Memory leak in Python

Sybren Stuvel sybrenUSE at YOURthirdtower.com.imagination
Tue May 9 03:03:09 EDT 2006


diffuser78 at gmail.com enlightened us with:
> I have a python code which is running on a huge data set. After
> starting the program the computer becomes unstable and gets very
> diffucult to even open konsole to kill that process. What I am
> assuming is that I am running out of memory.

Before acting on your assumptions, you need to verify them. Run 'top'
and hit 'M' to sort by memory usage. After that, use 'ulimit' to limit
the allowed memory usage, run your program again, and see if it stops
at some point due to memory problems.

Sybren
-- 
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 
                                             Frank Zappa



More information about the Python-list mailing list