execfile of large python script seems to leak memory

Harald Kirsch kirschh at lionbioscience.com
Wed May 30 17:27:05 CEST 2001


I have a veeery large generated python script (11000 lines). I run it
with execfile. It is supposed to create a data structure internally. 

Now I replaced every function generating the data structure with a
do-nothing dummy. Nevertheless, after execfile is done, the memory
footprint of the process is 80MB as if it does not give back anything
to the operating system.

This is on Linux where malloc normally *does* return greater chunks of
unused memory to the system. 

Any ideas how I can read the stuff in without increasing the memory
footprint unecessarily?

  Harald Kirsch


-- 
----------------+------------------------------------------------------
Harald Kirsch   | kirschh at lionbioscience.com | "How old is the epsilon?"
LION bioscience | +49 6221 4038 172          |        -- Paul Erdös



More information about the Python-list mailing list