title: Get the size of heap and stack per process in Linux
body: <p>I wanted to know the size of heap and stack per process in linux. Is there any way to find it?</p>
  
  <p>I found out that sbrk(0) will give me the end of heap. But how can I find the start of heap to get the heap size?</p>
  
  <p>Also on stack size is there any way to find the start of stack and current stack pointer address per process through any library calls or system calls?</p>