Re: [Boost-bugs] [Boost C++ Libraries] #4960: boost::pool_allocator for vector of vectors exhausts memory

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4960: boost::pool_allocator for vector of vectors exhausts memory
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-02-15 18:34:04


#4960: boost::pool_allocator for vector of vectors exhausts memory
--------------------------------------+-------------------------------------
  Reporter: mattiasg | Owner: cnewbold
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: pool
   Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
--------------------------------------+-------------------------------------

Comment (by johnmaddock):

 Update:

 This is a result of two bugs:

 1) std::vector invokes undefined behaviour by calling
 Allocator::allocate(0). This has been fixed in more recent GCC versions.
 2) Boost.Pool, when it tries to allocate 0 chunks thinks allocation has
 failed (a bug), so allocates a whole new block, *and* ups the size of the
 next block to allocate by a factor of 2. So just a few allocation
 requests for 0 chunks blows up the heap.

 This will be fixed in the sandbox version of Boost.Pool soon.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4960#comment:7>
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:05 UTC