[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 20:30:40 UTC 2017


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

--- Comment #5 from briancschott at gmail.com ---
> The problem is, this either break toy code that just
> creates lots of useless Fibers or heavy production code
> that actually needs 30K Fibers.

That's not entirely accurate. I found this because the range implementation for
a complex multi-dimensional tree structure was implemented as a
std.concurrency.Generator. The problem is caused by doing many tree traversals
in a loop on a machine that has 512GB of memory. We don't actually need 30k
fibers. We need one fiber at a time 30k times in a row. By the time we start
using the second fiber we don't need the first one anymore.

It's possible to re-implement the range in question, but the amount of code
required to do so is much greater than the current implementation using
recursion and fibers.

--


More information about the Digitalmars-d-bugs mailing list