2 ms·
> once we touch a page it becomes committed – it can't be uncommitted again because the OS doesn't know how the stack is used. I wonder if this could be solved
by kevincox 5y ago
> once we touch a page it becomes committed – it can't be uncommitted again because the OS doesn't know how the stack is used.
I wonder if this could be solved by the code itself. Every so often tell the OS that you don't need all of the stack pages that are currently unused.
Of course getting the "every so often" right to avoid a huge slowdown in edge cases isn't easy.