Boost C++ Libraries: Ticket #8557: VIRT Memory so much! https://svn.boost.org/trac10/ticket/8557 <p> #include &lt;boost/thread/thread.hpp&gt; </p> <p> #include &lt;boost/thread/mutex.hpp&gt; </p> <p> #include &lt;boost/bind.hpp&gt; </p> <p> #include &lt;iostream&gt; </p> <p> boost::mutex io_mutex; </p> <p> void count(int id) { </p> <blockquote> <p> for (int i = 0; i &lt; 10000; ++i) { </p> <blockquote> <p> boost::mutex::scoped_lock lock(io_mutex); </p> </blockquote> </blockquote> <blockquote> <blockquote> <p> std::cout &lt;&lt; id &lt;&lt; ": " &lt;&lt; i &lt;&lt; std::endl; </p> </blockquote> </blockquote> <blockquote> <blockquote> <p> boost::this_thread::sleep( boost::posix_time::milliseconds( 1 * 1000 ) ); </p> </blockquote> </blockquote> <blockquote> <p> } </p> </blockquote> <p> } </p> <p> int main(int argc, char* argv[]) { </p> <blockquote> <p> boost::thread thrd1(boost::bind(&amp;count, 1)); </p> </blockquote> <blockquote> <p> boost::thread thrd2(boost::bind(&amp;count, 2)); </p> </blockquote> <blockquote> <p> thrd1.join(); </p> </blockquote> <blockquote> <p> thrd2.join(); </p> </blockquote> <blockquote> <p> return 0; </p> </blockquote> <p> } </p> <p> ubuntu server 12.04 x64 kernel 3.5.0-27-generic </p> <p> VIRT Momory use 164m, too much than ubuntu server 10.04 x64 </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8557 Trac 1.4.3 viboes Fri, 10 May 2013 22:58:32 GMT owner, status changed https://svn.boost.org/trac10/ticket/8557#comment:1 https://svn.boost.org/trac10/ticket/8557#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> What is the problem you want we solve? Do you get the same using pthreads? If , not how do you reduce this consumption? </p> Ticket anonymous Sun, 12 May 2013 14:03:38 GMT <link>https://svn.boost.org/trac10/ticket/8557#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8557#comment:2</guid> <description> <p> When create one thead use VIRT memory: </p> <p> Ubuntu server 12.04 x64, pthread_create, Less 1M </p> <p> Ubuntu server 10.04 x64, boost::thread, About 10M </p> <p> Ubuntu server 12.04 x64, boost::thread, About 80M </p> <p> When I use ‘boost:thread’ create more than 1000 threads, About 80G VIRT memory, how can I solve it? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Wed, 15 May 2013 11:19:24 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8557#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8557#comment:3</guid> <description> <p> It would be useful if you can provide a program that shows this and try it on other versions of Boost and see if this is a regression on Boost.Thread or a regression on how Boost Thread uses Ubuntu resources. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Fri, 17 May 2013 19:26:49 GMT</pubDate> <title>milestone changed https://svn.boost.org/trac10/ticket/8557#comment:4 https://svn.boost.org/trac10/ticket/8557#comment:4 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.54.0</span> → <span class="trac-field-new">To Be Determined</span> </li> </ul> Ticket viboes Tue, 10 Sep 2013 20:03:37 GMT <link>https://svn.boost.org/trac10/ticket/8557#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8557#comment:5</guid> <description> <p> Do you have ciphers for Ubuntu server 10.04 x64, pthread_create? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Fri, 04 Oct 2013 20:34:53 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/8557#comment:6 https://svn.boost.org/trac10/ticket/8557#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> I can not do anything if you don't collaborate. </p> Ticket