I have a pointer available with me to a C/C++ variable. Is it possible to exactly make out which segment of the memory this variable belongs to ? If yes, how ?
Note: I just have the address of this variable, no further information if the variable is local/global etc.
Find out whether your architecture has pointers to your heap or stack region. Usually there are some stackpointers or framepointers..
Then compare your actual address to those addresses and decide where they belong.