linux3% valgrind ./test2.out ==12425== Memcheck, a memory error detector ==12425== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al. ==12425== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info ==12425== Command: ./a.out ==12425== Dump out graph (size = 5): [ 0]: 1 4 3 [ 1]: 2 0 4 [ 2]: 4 1 [ 3]: 0 4 [ 4]: 2 0 1 3 Dump out graph (size = 5): [ 0]: 1 4 3 [ 1]: 2 0 4 [ 2]: 4 1 [ 3]: 0 4 [ 4]: 2 0 1 3 Dump out graph (size = 5): [ 0]: 1 4 3 [ 1]: 2 0 4 [ 2]: 4 1 [ 3]: 0 4 [ 4]: 2 0 1 3 Dump out graph (size = 3): [ 0]: 2 1 [ 1]: 2 0 [ 2]: 1 0 Dump out graph (size = 5): [ 0]: 1 4 3 [ 1]: 2 0 4 [ 2]: 4 1 [ 3]: 0 4 [ 4]: 2 0 1 3 ==12425== ==12425== HEAP SUMMARY: ==12425== in use at exit: 0 bytes in 0 blocks ==12425== total heap usage: 54 allocs, 54 frees, 944 bytes allocated ==12425== ==12425== All heap blocks were freed -- no leaks are possible ==12425== ==12425== For counts of detected and suppressed errors, rerun with: -v ==12425== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 6 from 6) linux3%