volatile means that the variable may be altered by means not in control of the compiler. Therefore, this is an instruction to your compiler to not make assumptions about this variable - like put it in a register or some other optimization. The compiler is to create an actual memory variable for this value.
Comment