Skip to content
Snippets Groups Projects
Commit f78ce3a8 authored by Markus Blatt's avatar Markus Blatt
Browse files

[poolallocator,release] Use a non-static memory pool.

Due to its desgin of using one static memory pool. The allocator
could not be used in different threads at the same time without
side effects. With this revision each instance will hold its own private
instance of the pool.

There should be no issues with this patch and poolallocator seems to be
mostly used in AMG anyway.
parent 75e2716b
No related branches found
No related tags found
No related merge requests found
...@@ -368,7 +368,7 @@ namespace Dune ...@@ -368,7 +368,7 @@ namespace Dune
/** /**
* @brief The underlying memory pool. * @brief The underlying memory pool.
*/ */
static PoolType memoryPool_; PoolType memoryPool_;
}; };
// specialization for void // specialization for void
...@@ -551,9 +551,6 @@ namespace Dune ...@@ -551,9 +551,6 @@ namespace Dune
return p; return p;
} }
template<class T, std::size_t s>
typename PoolAllocator<T,s>::PoolType PoolAllocator<T,s>::memoryPool_;
template<class T, std::size_t s> template<class T, std::size_t s>
inline PoolAllocator<T,s>::PoolAllocator() inline PoolAllocator<T,s>::PoolAllocator()
{ } { }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment