Add logging of heap/non heap memory