Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7767: lockfree queue allocation problem
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-12-05 15:20:52
#7767: lockfree queue allocation problem
-----------------------------------------+----------------------------------
Reporter: pn.suzuki.kojiro@⦠| Owner: timblechmann
Type: Bugs | Status: closed
Milestone: To Be Determined | Component: lockfree
Version: Boost Development Trunk | Severity: Problem
Resolution: invalid | Keywords:
-----------------------------------------+----------------------------------
Comment (by Kojiro Suzuki <pn.suzuki.kojiro@â¦>):
Thank you for your answers, I understand it now.
I have an idea.[[BR]]
If you use the the previous code, and leave the assertion,[[BR]]
it generates assertion without trying to allocate huge elements.
{{{
queue(void):
head_(tagged_node_handle(0, 0)),
tail_(tagged_node_handle(0, 0)),
pool(node_allocator(), has_capacity ? capacity : 0) // add this
{
BOOST_ASSERT(has_capacity); // and leave this
initialize();
}
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7767#comment:6> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:11 UTC