Record and report memory usage change in profiling.