check heap space