core.thread.Fiber --- runtime stack overflow unlike goroutines

Dicebot via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Aug 15 08:25:22 PDT 2014


On Friday, 15 August 2014 at 14:45:02 UTC, Sean Kelly wrote:
> On Friday, 15 August 2014 at 14:28:34 UTC, Dicebot wrote:
>>
>> Won't that kind of kill the purpose of Fiber as low-cost 
>> context abstraction? Stack size does add up for thousands of 
>> fibers.
>
> As long as allocation speed is fast for large allocs (which I 
> have to test), I want to change the default size to be very 
> large.  The virtual address space in a 64-bit app is enormous, 
> and if the memory is committed on demand then physical memory 
> use should only match what the user actually requires.  This 
> should allow us to create millions of fibers and not overrun 
> system memory, and also not worry about stack overruns, which 
> has always been a concern with the default fiber stack size.

No, I was referring to the proposal to supply bigger stack size 
to Fiber constructor - AFAIR it currently does allocate that 
memory eagerly (and does not use any OS CoW tools), doesn't it?


More information about the Digitalmars-d-learn mailing list