title: How to see heap and stack usage of a function in c using valgrind?
body: <p>I  am working on a embedded system. We have limited stack and heap in our embedded system typically 64k (ram). I am trying to use polar-ssl library calls. Is there any  tools which tells how much stack and heap memory is used by a C function?</p>
  
  <p>Is there any option is  in valgrind which prints the following:</p>
  
  <ol>
  <li>Stack and heap usage of a function.</li>
  <li>Call trace of functions which  calls internally malloc with no of bytes.</li>
  </ol>