opt the memory usage