Checks Memory and Time Limit