Validate given minimal and maximal heap sizes