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.
This commit is contained in:
Etienne Renault 2018-07-11 14:28:34 +00:00
parent fe1be20f09
commit 23edf52dd5
12 changed files with 169 additions and 169 deletions

View file

@ -49,9 +49,9 @@ namespace
{
int i;
static spot::fixed_size_pool& pool()
static spot::fixed_size_pool<spot::pool_type::Safe>& pool()
{
static spot::fixed_size_pool p{sizeof(bar)};
static spot::fixed_size_pool<spot::pool_type::Safe> p{sizeof(bar)};
return p;
}
@ -108,7 +108,7 @@ int main()
#endif
{
spot::fixed_size_pool p(sizeof(foo));
spot::fixed_size_pool<spot::pool_type::Safe> p(sizeof(foo));
foo* a = new (p.allocate()) foo(1);
a->incr();