core.thread.Fiber --- runtime stack overflow unlike goroutines
Sean Kelly via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Aug 15 07:38:21 PDT 2014
On Friday, 15 August 2014 at 14:26:28 UTC, Sean Kelly wrote:
> On Friday, 15 August 2014 at 08:36:34 UTC, Kagamin wrote:
>> http://msdn.microsoft.com/en-us/library/windows/desktop/aa366887%28v=vs.85%29.aspx
>>> Allocates memory charges (from the overall size of memory and
>>> the paging files on disk) for the specified reserved memory
>>> pages. The function also guarantees that when the caller
>>> later initially accesses the memory, the contents will be
>>> zero. Actual physical pages are not allocated unless/until
>>> the virtual addresses are actually accessed.
>
> Oh handy, so there's basically no work to be done on Windows.
> I'll have to check the behavior of mmap on Posix.
It sounds like mmap (typically) works the same way on Linux, and
that malloc generally does as well. I'll have to test this to be
sure. If so, and if doing so is fast, I'm going to increase the
default stack size on 64-bit systems to something reasonably
large. And here I thought I would have to do this all manually.
More information about the Digitalmars-d-learn
mailing list