Subj : Re: 'volatile' Rules To : comp.programming.threads From : David Schwartz Date : Tue Jun 07 2005 08:24 am "Uenal Mutlu" <520001085531-0001@t-online.de> wrote in message news:d84181$rm3$03$1@news.t-online.com... > Some experimentations show that the second method ("b and c and d") > is by no means reliable. It _seems_ to work only if there is no function > call > between the visits to the variable, or if the called functions are all > inlined > (--> ie. rule d seems to be wrong). > The consequence is: only the use of locking gives a safe method, > everything else is unreliable and very risky. Unless you're just screwing around for the heck of it, why would you even mess with something that "just happens to work"? Would you advocate 'malloc'ing smaller blocks of memory that you are going to use because your implementation of 'malloc' happens to round them up?! DS .