• Tim Peters's avatar
    This no longer leaks memory when run in an infinite loop. However, · f6ed0740
    Tim Peters yazdı
    that required explicitly calling LazyList.clear() in the two tests that
    use LazyList (I added a LazyList Fibonacci generator too).
    
    A real bitch:  the extremely inefficient first version of the 2-3-5 test
    *looked* like a slow leak on Win98SE, but it wasn't "really":  it generated
    so many results that the heap grew over 4Mb (tons of frames!  the number
    of frames grows exponentially in that test).  Then Win98SE malloc() starts
    fragmenting address space allocating more and more heaps, and the visible
    memory use grew very slowly while the disk was thrashing like mad.
    Printing fewer results (i.e., keeping the heap burden under 4Mb) made
    that illusion vanish.
    
    Looks like there's no hope for plugging the LazyList leaks automatically
    short of adding frameobjects and genobjects to gc.  OTOH, they're very
    easy to break by hand, and they're the only *kind* of plausibly realistic
    leaks I've been able to provoke.
    
    Dilemma.
    f6ed0740
Adı
Son kayıt (commit)
Son güncelleme
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
RISCOS Loading commit data...
Tools Loading commit data...
.cvsignore Loading commit data...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
acconfig.h Loading commit data...
config.h.in Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...
setup.py Loading commit data...