virtual address of local variables
i was trying out this experiment.
having compiled with gcc on RHEL whenever i run the code the address of a is same(which i was expecting) but of b it changes every time i run the code.
can anybody plz explain to me why is it so.
arn't virtual addresses to the start of stack segments fixed.(maybe it has got to do something about that).
not sure...perhaps a, being global, winds up on the stack but b, being local, is defined in the module. In that case, you certainly wouldn't expect the system loader to load the module in the same place each time.
|All times are GMT -5. The time now is 02:39 PM.|