Hacker News new | ask | show | jobs
by DanWaterworth 5524 days ago
If you allocate the stacks contiguously using mmap then memory is only used as it is accessed. That's not the problem. The problem is that 4000 concurrent non-trivial threads is a resource hog no matter how the stacks are allocated.