Add memory usage to trace