[Stackless] Memory leak with Stackless and generators

Stephen Dolan stedolan at gmail.com
Wed Dec 20 11:57:07 CET 2006

If I run the following bit of code:
while 1:
  for i in [1]:pass

it, predictably enough, eats 100% CPU and uses about 3MB RAM (constant)

But, if I run
def foo():
  yield 1
while 1:
  for i in foo():pass

it uses about 250MB RAM after 5 seconds, and steadily increases by
about 50MB/sec.

(it's my own build of stackless, not using any configure options
except --prefix and stackless_version.h reads #define
STACKLESS_VERSION "3.1b3 060516")

Stephen Dolan

Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list