change allocated memory instead of max memory