News for hackers. Stuff that matters.
Re:Coroutines in C with Arbitrary Arguments by amelius on Sunday April 19, 2015 @06:05AM (#9402609)
Would it be possible to make a coroutine implementation that allows the stacks to grow dynamically? (If there are N coroutines, you will need N stacks, so for large N it does not suffice to have a statically conservatively preallocated stack for each coroutine).

Also, how is Rust's support for coroutines?

Re:Coroutines in C with Arbitrary Arguments by errordeveloper on Sunday April 19, 2015 @06:08AM (#9402613)
I have recently found this: https://github.com/rustcc/coroutine-rs
Re:Coroutines in C with Arbitrary Arguments by amelius on Sunday April 19, 2015 @06:24AM (#9402652)
Interesting, but the documentation does not seem to describe how stacks/memory management is done.
Re:Coroutines in C with Arbitrary Arguments by keeperofdakeys on Sunday April 19, 2015 @08:54AM (#9402953)
From a quick look at the code, it seems to use segmented stacks with memory mapping. https://github.com/rustcc/coroutine-rs/blob/master/src/stack...
Re:Coroutines in C with Arbitrary Arguments by rumcajz on Sunday April 19, 2015 @06:14AM (#9402627)
There's -fsplit-stack option in gcc IIRC.