On 16/04/2013 02:00,
andreaes...@gmail.com wrote:
> Hi all,
> can someone explain me how variables are stored in a multithreading program?
Is there an outline?Does it depends on compiler or SO?How is the memory
divided?
Thank you for your replay.
>
C (in common with most other programming languages) does bot specify how
things are done only what the results shall be. An implementation is
free to provide storage for variables in any way that it sees fit. A
stack per thread is not uncommon but there are other ways (linked frames
will do as well and has been used on some systems)
The question is 'Why does it matter to you as a programmer?'
Implementers have to worry about these (often hardware dependant)
details the rest of us only have to worry if they get it wrong.
--
comp.lang.c.moderated - moderation address:
cl...@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line. Sorry.