add method to measure memory after one single gc call