Commit graph

2 commits

Author SHA1 Message Date
Maximilien Colange
c9131aee72 add a pool allocator for STL containers
* spot/priv/allocator.hh, spot/priv/Makefile.am: add a STL-compliant
  allocator based on spot::fixed_size_pool
* spot/misc/fixpool.hh, spot/misc/fixpool.cc, spot/misc/Makefile.am:
  refactor the existing spot::fixed_size_pool
* spot/ltsmin/ltsmin.cc, spot/twa/twaproduct.cc: reflect changes in the
  interface of spot::fixed_size_pool
* tests/core/mempool.cc: test the new allocator
2018-06-20 14:26:45 +02:00
Maximilien Colange
3fe74f1cb9 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
2018-06-20 14:26:31 +02:00