validate memory limits & error out if less than 512 KB