Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71750 - sandbox/block_ptr/boost/detail
From: phil_at_[hidden]
Date: 2011-05-05 18:46:41


Author: pbouchard
Date: 2011-05-05 18:46:40 EDT (Thu, 05 May 2011)
New Revision: 71750
URL: http://svn.boost.org/trac/boost/changeset/71750

Log:
* Proper thread initialization of the pool list
Text files modified:
   sandbox/block_ptr/boost/detail/block_base.hpp | 9 +++++++++
   1 files changed, 9 insertions(+), 0 deletions(-)

Modified: sandbox/block_ptr/boost/detail/block_base.hpp
==============================================================================
--- sandbox/block_ptr/boost/detail/block_base.hpp (original)
+++ sandbox/block_ptr/boost/detail/block_base.hpp 2011-05-05 18:46:40 EDT (Thu, 05 May 2011)
@@ -95,6 +95,9 @@
         
     block_base * top(void * p)
     {
+ if (plii_.get() == 0)
+ plii_.reset(new pool_lii());
+
         pool_lii::reverse_iterator i;
         
         for (i = plii_->rbegin(); i != plii_->rend(); i ++)
@@ -116,6 +119,9 @@
         
     void * allocate(std::size_t s)
     {
+ if (plii_.get() == 0)
+ plii_.reset(new pool_lii());
+
         void * p = ordered_malloc(s);
         
         plii_->push_back(numeric::interval<long>((long) p, long((char *)(p) + s)));
@@ -133,6 +139,9 @@
         
     void deallocate(void * p, std::size_t s)
     {
+ if (plii_.get() == 0)
+ plii_.reset(new pool_lii());
+
         pool_lii::reverse_iterator i;
         
         for (i = plii_->rbegin(); i != plii_->rend(); i ++)


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk