make valgrind understand our memory pools

Annotate pools with valgrind macros so that it detects errors in pool
usage. Typically, we wish valgrind to detect a leak when the user fails
to call proper deallocation function.

* spot/misc/fixpool.hh, spot/misc/mspool.hh: here
* configure.ac: ensure that valgrind header exists
* tests/Makefile.am, tests/core/mempool.cc, tests/core/mempool.test,
  tests/core/.gitignore: add tests to ensure valgrind accurately detects
  leaks
This commit is contained in:
Maximilien Colange 2016-12-03 11:44:14 +01:00
parent b7e77743db
commit 3fe74f1cb9
7 changed files with 234 additions and 10 deletions

View file

@ -141,7 +141,7 @@ fi
AX_CHECK_BUDDY
AC_CHECK_HEADERS([sys/times.h])
AC_CHECK_HEADERS([sys/times.h valgrind/memcheck.h])
AC_CHECK_FUNCS([times kill alarm sigaction])
LT_CONFIG_LTDL_DIR([ltdl])