WHAT IS DIFFERENCE BETWEEN STATIC AND VOLATILE?
VOLATILE KEYWORD IS THAT WE ARE SAYING TO COMPILER TO NOT PERFORM OPTIMIZATION OF WHICH CACHE THE VALUE OF THE VARIABLE, IT GENERATES THE CODE THAT COMPILER GOES TO MEMORY EVERYTIME , INSTEAD OF LOOKING AT CACHE....IT IS USEFUL IN EMBEDDED SYSTEMS ,MEMORY MAPPED REGISTERS
No comments:
Post a Comment