Boost C++ Libraries: Ticket #9744: boost::lockfree::queue memory issue https://svn.boost.org/trac10/ticket/9744 <p> Queue takes too much memory. For example: sizeof(boost::lockfree::queue&lt;void* , boost::lockfree::fixed_sized&lt;true&gt;, boost::lockfree::capacity&lt;1000&gt; &gt;) == 64196 </p> <p> Pay attention that sizeof(boost::lockfree::queue&lt;void* , boost::lockfree::fixed_sized&lt;true&gt;, boost::lockfree::capacity&lt;10&gt; &gt;) == sizeof(boost::lockfree::queue&lt;boost::array&lt;char, 6 * sizeof(void*)&gt; , boost::lockfree::fixed_sized&lt;true&gt;, boost::lockfree::capacity&lt;10&gt; &gt;) == 836 </p> <p> sizeof(boost::lockfree::queue&lt;void* , boost::lockfree::fixed_sized&lt;true&gt;, boost::lockfree::capacity&lt;11&gt; &gt; ) == 900 Seems like each element takes at least 64 BYTES!!!(while sizeof(void*) == 8) </p> <p> Test environment: Linux 2.6.32-358.23.2.el6.x86_64 GNU/Linux <a class="missing wiki">CentOs</a> 6.4 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3) </p> <p> Thanks, Alexey </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9744 Trac 1.4.3 timblechmann Wed, 05 Mar 2014 13:49:34 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/9744#comment:1 https://svn.boost.org/trac10/ticket/9744#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> the queue is a node-based data structure. please consult the michael/scott paper and try to understand the implementation before opening bugs. </p> Ticket