[Stackless] Memory leak with Stackless and generators

Carlos Eduardo de Paula cedepaula at yahoo.com.br
Wed Dec 20 19:42:22 CET 2006


This happens here too. Using Windows XP SP2.. 

Python 2.5 Stackless 3.1b3 060516 (release25-maint:52742, Nov 12 2006, 23:19:59)
 [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

Running the second piece of code i got almost 280Mb in less than 30 seconds...


Carlos


----- Original Message ----
From: Stephen Dolan <stedolan at gmail.com>
To: stackless at stackless.com
Sent: Wednesday, December 20, 2006 8:57:07 AM
Subject: [Stackless] Memory leak with Stackless and generators

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.

Why?
(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")

Thanks,
Stephen Dolan

_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless



More information about the Stackless mailing list