sort out memory context confusion
Equation
Clean up comparetup_heap()