Heap.89z is a tiny program for use on TI-89 (or higer version TI calculators) to display how much free heap space (memory) on the device. It can be used to test whether the execution of a program causes memory leak. For this purpose, follow the steps below: (Assume that you have installed heap.89z as well as the program you want to test on your calculator) 1. On the home screen, press [F8][8] (Clear Home) to empty the home screen history list. 2. Type in heap() on the home screen if it is installed under the current directory, or locate heap program via VAR-LINK; then press [ENTER] to run. 3. Note down the heap size that is displayed by the heap program, and press any key to terminate the program. 4. On the home screen, press [F8][8] to clear home again. 5. Run the program that you want to test. After its termination, go back to the home screen. 6. On the home screen, press [F8][8] to clear home once more. 7. Run heap() again and compare if the displayed heap size is the same as the one you noted down a minute ago. If there is a decrease, the program has memory leak thus not safe to run. However, if the two heap size records are the same, it merely indicates that there is no memory leak happened in this specific execution of the program, and DOES NOT mean that the program will not incur memory leak under all conditions, because a program may run different routines depending on the input data. Yanchao Liu Department of Industrial and Systems Engineering University of Wisconsin-Madison yliu67@wisc.edu