[Numpy-discussion] Python memory management issues using Linux. Maybe Numpy, related.

Jeffrey Spencer jeffspencerd at gmail.com
Sun May 22 12:55:13 EDT 2011


Much reduced code exhibiting the issue. This shouldn't use much memory 
but just keeps going up and up because the copied window I assume gets 
left around and not taken up by the garbage collector.

On 22/05/11 23:42, Ralf Gommers wrote:
>
>
> On Sun, May 22, 2011 at 2:54 PM, Jeffrey Spencer 
> <jeffspencerd at gmail.com <mailto:jeffspencerd at gmail.com>> wrote:
>
>     Sorry. I attached here the class and script to run it. It is just
>     a minimalistic example of what I'm really doing that exhibits the
>     same behavior. All the script does is run at.createSpecific after
>     instantiating the class. I have seen this exhibited on many other
>     cases but it runs fine in Windows XP. Here is what the script does:
>
>     import MemoryLeak
>     at = MemoryLeak.Model()
>     at.createSpecific()
>
> That manages to eat up all my cpu cycles for about 5 minutes, but no 
> leak (on OS X). I also don't see anything in the code that can 
> potentially give problems. I suggest you strip this down a lot more so 
> you can isolate the problem.
>
> If in your original code you were making a lot of figures in one of 
> those for loops without explicitly closing them, that could perhaps be 
> a problem. But you removed all I/O and matplotlib related code already 
> (except for imports and some keywords).
>
> Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110523/913e56cc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: runTempLeak1.py
Type: text/x-python
Size: 723 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110523/913e56cc/attachment.py>


More information about the NumPy-Discussion mailing list