[Tutor] memory management

Christian Tismer tismer@appliedbiometrics.com
Sat, 17 Apr 1999 00:07:13 +0200


Arne Mueller wrote:
<snip/>
> I've monitore memory usage on my computer and after executing the three
> above loops the memory usage should go down - but it doesn't! Whats' up?
> Is the memory collected for internal usage by python, would it be reused
> when creating new objects, or is the above way to free lists and
> dictionaries of objects wrong?

No, AFAIK Python does never free memory which it had
acquired before, but it will reuse it.
It is better to avoid such tremendous memory usage,
maybe you should write your results out to a marshal
file and spawn a new process, or try to change your
algorithm to be less greedy :-)

ciao - chris

-- 
Christian Tismer             :^)   <mailto:tismer@appliedbiometrics.com>
Applied Biometrics GmbH      :     Have a break! Take a ride on Python's
Kaiserin-Augusta-Allee 101   :    *Starship* http://starship.python.net
10553 Berlin                 :     PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
     we're tired of banana software - shipped green, ripens at home