News for hackers. Stuff that matters.
Re:The Absurdity Of Stacks by mananaysiempre on Sunday May 21, 2023 @08:03PM (#36025844)
> If we limited the maximum per frame stack size and probed properly, we could do split stacks no problem.

IIRC the initial Go implementation of split stacks also worked no problem (the benefits of owning the compiler and the ABI), and the reason it was ultimately abandoned was that it got very slow when you happened to repeatedly call a function when you had too little stack space left in the current segment (because you can’t grow the current segment, because you can’t move stack segments, because they may have pointers into them). If that is the problem, replacing a check in the function prologue with a page fault hitting the guard page looks unlikely to make this particular slow case faster.

There are no comments on this comment yet.