3 ms·
> the OS can't be sure how much of the stack is actually used. It cannot even assume that only addresses above sp are used A nitpick, and a possible optimizati
by jlokier 6y ago
> the OS can't be sure how much of the stack is actually used. It cannot even assume that only addresses above sp are used
A nitpick, and a possible optimization opportunity.
If there are any unmasked signal handlers not using SA_ONSTACK, the OS can reasonably assume the thread doesn't care about memory below sp - redzone (redzone is 128 bytes on AMD64) and therefore there would be no harm in reclaiming it.