Out of memeroy for heap and sort algorthms