On 01/25/2014 08:58 AM, Bill Myers wrote:
Stack management for green tasks has been based in the past first on segmented 
stacks and then on standard large stacks.

However, I just realized that there is a third alternative which might well be 
better than both of those.

The idea is very simple: a green task would run on a large stack like now, but 
when it is descheduled, a memory buffer of the size of its used stack space is 
allocated, and its stack data is copied there; when it is rescheduled, the 
stack data is copied back to the original address.

That's a really clever idea. There are though a number of situations where we unsafely read from or write into other task's stacks that would need to be considered carefully.

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to