[Boost-bugs] [Boost C++ Libraries] #9744: boost::lockfree::queue memory issue

Subject: [Boost-bugs] [Boost C++ Libraries] #9744: boost::lockfree::queue memory issue
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-03-05 12:23:02


#9744: boost::lockfree::queue memory issue
------------------------------------------------+--------------------------
 Reporter: Alexey Yakymets <alexy.yakymets@…> | Owner: timblechmann
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: lockfree
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
------------------------------------------------+--------------------------
 Queue takes too much memory.
 For example:
 sizeof(boost::lockfree::queue<void* , boost::lockfree::fixed_sized<true>,
 boost::lockfree::capacity<1000> >) == 64196

 Pay attention that
 sizeof(boost::lockfree::queue<void* , boost::lockfree::fixed_sized<true>,
 boost::lockfree::capacity<10> >) ==
 sizeof(boost::lockfree::queue<boost::array<char, 6 * sizeof(void*)> ,
 boost::lockfree::fixed_sized<true>, boost::lockfree::capacity<10> >) ==
 836

 sizeof(boost::lockfree::queue<void* , boost::lockfree::fixed_sized<true>,
 boost::lockfree::capacity<11> > ) == 900

 Seems like each element takes at least 64 BYTES!!!(while sizeof(void*) ==
 8)

 Test environment:
 Linux 2.6.32-358.23.2.el6.x86_64 GNU/Linux CentOs 6.4
 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)

 Thanks,
 Alexey

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9744>
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:15 UTC