Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r84844 - trunk/boost/lockfree
From: tim_at_[hidden]
Date: 2013-06-20 05:57:33


Author: timblechmann
Date: 2013-06-20 05:57:33 EDT (Thu, 20 Jun 2013)
New Revision: 84844
URL: http://svn.boost.org/trac/boost/changeset/84844

Log:
lockfree: spsc_queue - fix allocation (2)

Text files modified:
   trunk/boost/lockfree/spsc_queue.hpp | 4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)

Modified: trunk/boost/lockfree/spsc_queue.hpp
==============================================================================
--- trunk/boost/lockfree/spsc_queue.hpp Thu Jun 20 05:28:04 2013 (r84843)
+++ trunk/boost/lockfree/spsc_queue.hpp 2013-06-20 05:57:33 EDT (Thu, 20 Jun 2013) (r84844)
@@ -363,8 +363,8 @@
         Alloc(alloc), max_elements_(max_elements + 1)
     {
         // TODO: we don't necessarily need to construct all elements
- array_ = Alloc::allocate(max_elements);
- for (size_t i = 0; i != max_elements; ++i)
+ array_ = Alloc::allocate(max_elements_);
+ for (size_t i = 0; i != max_elements_; ++i)
             Alloc::construct(array_ + i, T());
     }
 


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