开发者

Threads sharing Stack locations?

I did a search but cou开发者_开发百科ldn't find anything. I was reading a paper that mentions thread sharing stack locations.... I wonder how and why'd that be needed. Any examples would be highly appreciated.

Many thanks.


If you declare a variable on the stack and pass it's address to another thread, you are essentially sharing a stack location. Is that what the paper described?

Or was the paper referring to OS support such that the threads using the same stack to keep the EIP/SP etc.? Seems like a problem waiting to happen for me. I guess you could do that to make sure that stack space is not wasted for each thread when you know the constraints of your code, but seems like an overkill.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜