corrected computation of number of bytes used by the heap