Freeing (vfree-ing) pointer to volatile data
问题 volatile seems to be a never ending question of every one. I thought I knew everything about it, but then I encountered this: So, I have a piece of memory shared between threads and I defined it like this: volatile type *name; If it makes you feel better, you can imagine type is just an int . This means I have a pointer (that is not volatile) to some data that are volatile. So, for example when it comes to optimizing, the compiler can cache the value of name but not name[0] . Am I right? So,