Closed andy5995 closed 2 years ago
Output of 'make memcheck':
[andy@prometheus build]$ make memcheck
Consolidate compiler generated dependencies of target test-c-vector
[100%] Built target test-c-vector
==15257== Memcheck, a memory error detector
==15257== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==15257== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info
==15257== Command: /home/andy/src/c-vector/build/test-c-vector
==15257==
capacity: 4
size : 2
v[0] = 10
v[1] = 20
v[0] = 10
v[1] = 20
==15257==
==15257== HEAP SUMMARY:
==15257== in use at exit: 0 bytes in 0 blocks
==15257== total heap usage: 4 allocs, 4 frees, 1,100 bytes allocated
==15257==
==15257== All heap blocks were freed -- no leaks are possible
==15257==
==15257== For lists of detected and suppressed errors, rerun with: -s
==15257== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
[100%] Built target memcheck
This looks great! and I also love that valgrind gave a clean bill of health.
Thanks!
I converted your example program to make a test that can be runnable through cmake with 'make check'.