Upper memory limit

Michael Gilfix mgilfix at eecs.tufts.edu
Tue May 14 10:00:06 EDT 2002


  I got the impression from your first post that you were complaining
that Python wasn't freeing memory at all (I could be totally
off). Perhaps the problem might be circular references? Is your
data structure self-referential? If so, you should be using
weakref's. There's nothing python can do to free circular references
because it always thinks they're in use.

              -- Mike

On Tue, May 14 @ 15:39, Siegfried Gonzi wrote:
> The program does not use really 200MB I would say. As I wrote: I call 8
> times a specific function. The specific function itself consumes about
> 20MB RAM and delivers a floating point array of dimension 71x12 back.  I
> weight the 8 arrays and  pass one result array  to a function in order
> to write the result array to a file. 
> 
> But I do not get it why Python does not delete the 20MB and leaves only
> the 71x12 array sound when it comes back from the function. That was the
> reason why I asked: does Python collect garbage and get rid of it at the
> end of the calculation (Python collects 8*20 MB + 40 MB and at the end
> it deletes this 200 MB junk); or does Python collect 20MB, removes the
> 20MB (71x12 array is negligible here), goes on to the next 20MB and
> removes the 20MB, and so on....

-- 
Michael Gilfix
mgilfix at eecs.tufts.edu

For my gpg public key:
http://www.eecs.tufts.edu/~mgilfix/contact.html





More information about the Python-list mailing list