Add option to specify maximum pgm memory size