From ae1a8eff91b8f715ccc74419b1f0857ab10b6181 Mon Sep 17 00:00:00 2001 From: Markus Blatt <mblatt@dune-project.org> Date: Fri, 4 Dec 2009 13:31:27 +0000 Subject: [PATCH] Added assertion just to be sure. [[Imported from SVN: r5739]] --- dune/common/poolallocator.hh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dune/common/poolallocator.hh b/dune/common/poolallocator.hh index 99befa365..2c5f7924c 100644 --- a/dune/common/poolallocator.hh +++ b/dune/common/poolallocator.hh @@ -509,6 +509,10 @@ namespace Dune char* start = chunks_->memory_; char* last = &start[elements*alignedSize]; Reference* ref = new (start) (Reference); + + // grow is only called if head==0, + assert(!head_); + head_ = ref; for(char* element=start+alignedSize; element<last; element=element+alignedSize) { -- GitLab