[Issue 17914] [Reg 2.075] Fibers guard page uses a lot more memory mappings

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 26 19:14:30 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=17914

--- Comment #4 from Martin Nowak <code at dawg.eu> ---
(In reply to Steven Schveighoffer from comment #3)
> > I'd err on the side of memory safety. Stack overflows are an actual problem
> > with Fibers and hard&time-consuming to debug.
> 
> Except this breaks existing code that may not have a stack overflow problem.
> I hate to say it, but unfortunately, we are stuck with the status quo for
> now.

The problem is, this either break toy code that just creates lots of useless
Fibers or heavy production code that actually needs 30K Fibers.

For the latter it's reasonable to ask for manual tuning of either the kernel or
the Fiber stack&guard size.
For the former it's fairly hard to justify that the default has such a severe
memory and safety hole.

Why isn't the number of guard pages a problem on Windows? That kernel also
needs to keep track of lots of memory regions.

If we really need a comprise here, I'd definitely increase the stack size
further, e.g. to 64KiB (vibe.d's default).

--


More information about the Digitalmars-d-bugs mailing list