is there any way to find the address range of heap and stack allocated to an application in Ubuntu? I hope Valgrind or a plugin of Valgrind can help me but I didn't find it.
On Linux you can inspect /proc/[pid]/maps
file containing currently mapped regions to the process. The file also has special sections [stack]
for stack of main process, [stack:<tid>]
for thread tid stack and [heap]
for process heap. For more info, see man 5 proc
.