Is the address of a global variable guaranteed to say the same thing throughout the execution process? That is, I have
static int dummy;
and i use
something(&dummy);
in several different places in my code. Will it &dummy
ever change, or can I safely use it as a key that is unlikely to be reused by another library (for example, in hashmap)?
This, of course, suggests that I do not restart the program or reload the library.
(Context: It was recommended to me by some people on the Lua mailing list. I used it here .)