Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can thread stacks be built in privately mapped memory?

built mapped memory stacks thread
0
Posted

Can thread stacks be built in privately mapped memory?

0

I’ve avoided any response to this long thread for a while because I’m not sure I want to confuse the issue with facts. And, despite, the facts, I like the idea of people learning to treat thread stacks “as if they might be” private. Nevertheless, at some time I thought it might be helpful to point out what POSIX says about the matter… and I guess this is a good time. POSIX very specifically disallows “non-shared” memory between threads. That is, it requires that the address space is associated with the PROCESS, not with the individual THREADS. All threads share a single virtual address space, and no memory address is private. Stacks, in particular, CANNOT be set up with private memory. Although, for safe programming, you should almost always pretend that it’s private. /—[ Dave Butenhof ]———————–[ butenhof@zko.dec.com ]—\ | Digital Equipment Corporation 110 Spit Brook Rd ZKO2-3/Q18 | | 603.881.2218, FAX 603.881.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123