[Stackless] Tasklet Slot Inheritance

Christian Tismer tismer at stackless.com
Mon May 21 05:17:25 CEST 2007

On 20.05.2007, at 21:53, Kristján Valur Jónsson wrote:

>> -----Original Message-----
>> IOW., I need to call tp_clear here, because the GC fails to do it,
>> because references coming from stack slices are not detected and GC
>> never gets called.
>> Maybe it is possible to do a less crude cleanup, preserving user
>> attributes,
>> if you think it is worth the effort.
> Hm, I'm not sure that I understand the logic, given how gc detects the
> existence of external references...
> Was there a concrete leak example that this fixed?
> Maybe we can construct a testcase to go into the unittestsuite.

GC references on local variables are hidden while on the stack.
We squirrel them away by putting them into stack slices.
These cannot be inspected by GC.
Before GC can do anything with them, they must leave the stack!
The point is that we have an unconventional way to produce
extra references by this, so we have to have a way to break
these cycles, because they are undetectable by GC.

Think about it - it is of course very easy to create a test case
for this. GC is not aware of extra references through the stack,
eventually they are all cleared. Not for Stackless with hard
switching. They can exist for a very long time.

ciao -- chris

Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list