Hacker News new | ask | show | jobs
by kelnos 4601 days ago
Not entirely, as I understand it. Segmented stacks is just one solution. Another is to start with a very small stack, and grow it contiguously (copying to a new location if necessary) when an overflow is imminent. You still get the benefit of having small stacks, which lets you make those 100ks of userland threads, and as long as they don't blow up their stack usage (same requirement as for segmented stacks), they'll be fine.
1 comments

I played with the idea of something like this a while back, but never finished it:

https://github.com/roboprog/buzzard/blob/master/test/src/mai...

It performed reasonably well in a demo doing a bunch of string concatenation, but I never followed up on it.

https://github.com/roboprog/mp_bench/blob/master/thd_frk.bzr...