Quote:
Originally Posted by jacques83
By a recursive call, I am running till the stack overflows...Is this a good method to see the total stack, right from the 1st till the last address? Please comment....
NO!
In some configurations, the stack won't overflow, it will just grow indefinitely, which case an infinite recursion will bring down the entire system instead of crashing.
On some compilers, an infinite recursion will be optimized into an infinite loop, which will just sit there and do nothing forever.
In general, one never tries to make his own program crash on purpose. That's for actual errors.
To get the maximum stack size, see 'man getrlimit'.
To get the starting stack position, if you are on linux, take a look at /proc/<pid>/maps like I already suggested.