thread stack size on Windows (Visual C++)

前端 未结 2 1139
南旧
南旧 2020-12-17 20:40

Is there a call to determine the stack size of a running thread? I\'ve been looking in MSDN thread functions documentation, and can\'t seem to find one.

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-17 21:24

    You can get the current committed size from the Top and Bottom in the TEB. You can get the process initial reserve and commit sizes from the PE header. But you cannot retrieve the actual sizes passed to CreateThread, nor is there any API to get the remaining size of reserved nor committed from current stack, see Thread Stack Size.

提交回复
热议问题