revise run-memory calculation