Monitoring of heap and threads