Make child heap size calculation cleaner