[SciPy-user] Debugging memory exhaustion in Python?

Brian Granger ellisonbg.net@gmail....
Fri Jun 15 02:08:16 CDT 2007

Some questions:

1)  What version of python are you using?  Python 2.4 and below has
some issues with memory not  being released back to the OS.

2)  What data structures are you using to represent the data?


On 6/14/07, Greg Novak <novak@ucolick.org> wrote:
> I've written Python code to calculate a bunch of things for a bunch of
> simulations.  The code goes through about 5GB in 10-100MB chunks.  The
> problem is that Python eventually runs out of memory, consuming
> (according to top) 3GB.  I don't see why it should be doing this--as
> far as I know I'm not hanging on to any references of anything.
> I've fooled around with the garbage collector, turning debugging
> information on and trying to  see if it will give me useful info about
> who or what is still hanging around in memory.
> I've tried to delete all the user variables but even after this the
> garbage collector can't free any more memory.
> What I need is du for python memory, just to get a sense of how/why
> this is happening.  Anyone have suggestions about how to get traction
> on this?
> Thanks,
> Greg
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user

More information about the SciPy-user mailing list