how does stack growing work on windows and linux?

后端 未结 1 955
一个人的身影
一个人的身影 2020-12-21 11:24

I just read that windows programs call _alloca on function entry to grow the stack if they need more than 4k on the stack. I guss that every time the guard page

相关标签:
1条回答
  • 2020-12-21 11:53

    Linux relies on a heavily optimized page fault handling, so what happens is that the program just pushes things on the stack and the page fault handler will extend the stack on the fly.

    0 讨论(0)
提交回复
热议问题