News for hackers. Stuff that matters.
Re:C++ Coroutine Theory (2017) by ioquatix on Tuesday February 06, 2018 @07:46PM (#16321380)
I appreciate all your points. However, in my experience implementing coroutines and fibers, where I allocated stacks using `mmap`, with guard pages, I'm not completely convinced that fixed-size stacks are an issue:

1/ The typical C stack is fixed size and code is written accordingly.

2/ `mmap` can allocate virtual memory, so you can allocate a large stack but that's an upper limit, it might be paged out if unused.

Thoughts?

Re:C++ Coroutine Theory (2017) by WillReplyfFood on Wednesday February 07, 2018 @11:14AM (#16325405)
How about fixed size stacks- with a canary of a expansionfunction at the top? That way you can have it both- the speed and fixed size- and expandability on demand- by simply checking for the canary in a pattern and executing it ..