core.thread.Fiber --- runtime stack overflow unlike goroutines
Carl Sturtivant via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Aug 15 13:19:18 PDT 2014
On Friday, 15 August 2014 at 20:11:43 UTC, Carl Sturtivant wrote:
> On Friday, 15 August 2014 at 08:41:30 UTC, Kagamin wrote:
>> On Thursday, 14 August 2014 at 07:46:29 UTC, Carl Sturtivant
>> wrote:
>>> The default size of the runtime stack for a Fiber is
>>> 4*PAGESIZE which is very small, and a quick test shows that a
>>> Fiber suffers a stack overflow that doesn't lead to a clean
>>> termination when this limit is exceeded.
>>
>> Pass a bigger stack size to the Fiber constructor?
>
> No good if the stack size needed depends dynamically on the
> computation in that Fiber.
Should have read further down the thread --- you're right as the
memory is in effect merely reserved virtual memory and isn't
actually allocated.
More information about the Digitalmars-d-learn
mailing list