update  memory usage