Generators in D

Sean Kelly sean at invisibleduck.org
Wed May 18 11:29:03 PDT 2011


On May 18, 2011, at 8:00 AM, Piotr Szturmaj wrote:

> Sean Kelly wrote:
>> On May 17, 2011, at 2:37 PM, Piotr Szturmaj wrote:
>>> 
>>> But couldn't Fiber's stack be scanned for references to itself and readjusted?
>> 
>> Without type information, there's no way to be sure that something is actually a reference, so corruption could occur.
> 
> Then, how GC scan Fiber's stack for references? I thought some portion of GC code could be used for this.

The GC is conservative.  If it encounters a value that matches the address of GCed memory, it won't collect the memory.


More information about the Digitalmars-d mailing list