adjust memory usage