Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6610: customizing boost::pool/boost::object_pool via template parameter for ordered/non-ordered usage
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-05-06 13:48:21
#6610: customizing boost::pool/boost::object_pool via template parameter for
ordered/non-ordered usage
--------------------------------+-------------------------------------------
Reporter: rad_d@⦠| Owner: edupuis
Type: Feature Requests | Status: assigned
Milestone: To Be Determined | Component: pool
Version: Boost 1.48.0 | Severity: Problem
Resolution: | Keywords:
--------------------------------+-------------------------------------------
Comment (by edupuis):
1. Method boost::pool::purge_memory() does not require the pool to be
ordered. Documentation has to be amended.
2. Current implementation of boost::pool::release_memory() fails if the
pool is not ordered. It could be implemented by adding a pool.order()
function which could be called by the user to make an unordered pool
ordered. The pool.order() function could also be called automatically if
the pool maintains a boolean describing whether it is ordered or not.
3. We could provide a gateway to release_memory() and to purge_memory(),
the latter calling destructors of objects allocated, exactly what is
already implemented in the destructor of object_pool.
4. This is related to ticket #3789. In the current implementation,
boost::object_pool can not be used to allocate arrays of objects.
5. If ticket #3789 is resolved, this is probably not as needed. However,
it could let a user choose between a slow 'object_pool::free()' or a slow
'object_pool::~object_pool()' as described in ticket #3789, although I
fail to see relevant usages where one would choose a slow free. The
suggested template parameter seems useless for boost::pool as the caller
chooses between the ordered or unordered malloc/free functions.
Any comments ?
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6610#comment:2> 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:09 UTC