Memory leak while looping

Roger Hancock roger_hancock at hotmail.com
Fri Apr 18 05:00:56 CEST 2003


Thanks for the help.  The xrange call solved my problem.  However, I'm
still a little puzzled by the behavior I'm seeing with the range call.
 With my now better understanding of the range call, I would expect to
see my function take a big chunk of memory until the function exited. 
Instead, the function continues to grab more and more memory.  First,
it takes most of my physical memory (256 MB) and then proceeds to eat
up my swap memory.  Eventually my machine reboots.  Pretty impressive,
huh?  Just imagine the damage I could do with 4 lines of code.

Thanks again,

Roger




More information about the Python-list mailing list