]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Also lock memory pool when computing memory consumption.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 24 Jan 2008 17:18:05 +0000 (17:18 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 24 Jan 2008 17:18:05 +0000 (17:18 +0000)
git-svn-id: https://svn.dealii.org/trunk@15672 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/vector_memory.h

index 1336ed7b7a9c7073abcbec115861ab1c6fbcda18..14f36ce268b6a3c410152b85165cb637c7b102fc 100644 (file)
@@ -495,6 +495,8 @@ inline
 unsigned int
 GrowingVectorMemory<VECTOR>::memory_consumption () const
 {
+  Threads::ThreadMutex::ScopedLock lock(mutex);
+
   unsigned int result = sizeof (*this);
   const typename std::vector<entry_type>::const_iterator
     end = pool.data->end();

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.