Added comparison of pval (pointer on the stack) and min and max heap addresses.