Check RAM usage during runtime of my application

Using the nRF Connect Desktop application and the nRF Connect SDK for my nRF9160dk.

I would like to monitor RAM usage during runtime of my program. In particular I am interested in the peak memory usage of certain parts of my code.

Is there a way to achieve this? 

Related