Parameterizing max memory.