improved internal memory usage measure