[Stackless] Stackless status
Just van Rossum
just at letterror.com
Sun Oct 8 18:17:33 CEST 2000
At 4:53 PM +0300 08-10-2000, Christian Tismer wrote:
>What memory-leak problem are you referring to? Stackless
>Python itself has no leak, when just used to replace
>the Standard distribution. It is said that the continuation
>module shows a leak under special circumstances with
>exception handlers, but I couldn't reproduce them yet.
>
>If anybody can produce such a leak under Win32, please
>let me know and send me the code.
Dunno about Win32, but the following script leaks on my machine (most of
the time, but not always!):
import continuation
class LeakMonitor:
instances = 0
def __init__(self):
LeakMonitor.instances = LeakMonitor.instances + 1
def __del__(self):
LeakMonitor.instances = LeakMonitor.instances - 1
def leaker():
continuation.return_current()
lm = LeakMonitor()
for i in range(10000):
try:
1/0
except:
pass
continuation.uthread_reset()
print "done!"
co = leaker()
# minimal uthread scheduler
while co:
co = continuation.timeslice(co)
print "Number of instances left (should be zero):", LeakMonitor.instances
(The stackless version I have is somewhat newer than 1.1)
Just
_______________________________________________
Stackless mailing list
Stackless at starship.python.net
http://starship.python.net/mailman/listinfo/stackless
More information about the Stackless
mailing list