linux2% gcc -Wall -g -c bst.c linux2% gcc -Wall -g -c demo8a.c linux2% gcc bst.o demo8a.o linux2% linux2% ./a.out ### Simple test ### item [size] ------------------------------- 1 [1] 3 [3] 9 [1] 11 [7] 16 [1] 21 [3] 32 [1] ------------------------------- ### Testing bst_find() ### Found 9 Did not find 23 ### Testing bst_remove() ### Found 11 ------------------------------- 1 [1] 3 [2] 9 [6] 16 [1] 21 [3] 32 [1] ------------------------------- linux2% linux2% valgrind ./a.out ==2514== Memcheck, a memory error detector ==2514== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. ==2514== Using Valgrind-3.6.0 and LibVEX; rerun with -h for copyright info ==2514== Command: ./a.out ==2514== ### Simple test ### item [size] ------------------------------- 1 [1] 3 [3] 9 [1] 11 [7] 16 [1] 21 [3] 32 [1] ------------------------------- ### Testing bst_find() ### Found 9 Did not find 23 ### Testing bst_remove() ### Found 11 ------------------------------- 1 [1] 3 [2] 9 [6] 16 [1] 21 [3] 32 [1] ------------------------------- ==2514== ==2514== HEAP SUMMARY: ==2514== in use at exit: 0 bytes in 0 blocks ==2514== total heap usage: 7 allocs, 7 frees, 112 bytes allocated ==2514== ==2514== All heap blocks were freed -- no leaks are possible ==2514== ==2514== For counts of detected and suppressed errors, rerun with: -v ==2514== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 12 from 8) linux2% exit