Allocate memory settings and allow override of env variables