add option -m for setting memory