Added functionality to monitor memory changes all through run time,
not just at the beginning and end of execution