memory usage can be dynamically selected

use memLog