Freeing memory

Siegfried Gonzi siegfried.gonzi at kfunigraz.ac.at
Thu Apr 25 08:09:27 EDT 2002


The topic has emerged quite often in the past but never completely
answered.

I have an application which consumes at every run 60MB RAM. Every new
start of the script ('Run scipt') augments the memory up to old_memory +
60MB. After a few runs I am at 400MB.

I always just thought Python has a garbage collector and will dispose
the memory after the last reference (for me this means: end of my
script).

In Clean or Common Lisp or R-language or Yorick I never had any dire
need to
consult the Windows Task-Manager. The explanation that Python really
gets rid of the memory but the Windows OS does not show it sounds a
little bit strange to me. 

I am now a little bit more accustomed to Python, but I cannot imagine to
use it further for larger projects. My machine has got 256MB RAM and I
just use Windows XP (80MB RAM) and Python2.2; there is absolutely no
excuse
for Python not to find any free successive memory block.

There is the chance that  memory becomes free; but I am not willing to
wait about 10 minutes (after a 10 minutes calculation) in order to see a
possible disposing of memory. I want to start the second simulation
right after the first, but after a few simulations I end up at 400MB and
Python chrashes.


Any suggestions? 

S. Gonzi



More information about the Python-list mailing list