Commit graph

3 commits

Author SHA1 Message Date
Etienne Renault
23edf52dd5 fixpool: propose alternative policy
In 3fe74f1c, fixed_size_pool was changed in order to
help memcheck to detect "potential" memory leaks. In a
multithreaded context, this could raise false alarm. To
solve this, we proprose 2 policies for the pool, one with
the check and one without.

* spot/misc/fixpool.cc: deleted ...
* spot/ltsmin/ltsmin.cc, spot/ltsmin/spins_kripke.hh,
spot/mc/deadlock.hh, spot/misc/Makefile.am,
spot/misc/fixpool.cc, spot/misc/fixpool.hh,
spot/priv/allocator.hh, spot/ta/tgtaproduct.cc,
spot/ta/tgtaproduct.hh, spot/twa/twaproduct.cc,
spot/twa/twaproduct.hh, tests/core/mempool.cc: Here.
2020-06-03 12:22:26 +02:00
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