[Boost-bugs] [Boost C++ Libraries] #8557: VIRT Memory so much!

Subject: [Boost-bugs] [Boost C++ Libraries] #8557: VIRT Memory so much!
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-05-09 14:11:38


#8557: VIRT Memory so much!
------------------------------+---------------------------------------------
 Reporter: lucybird@… | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: Boost 1.54.0 | Component: thread
  Version: Boost 1.53.0 | Severity: Problem
 Keywords: thread memory |
------------------------------+---------------------------------------------
 #include <boost/thread/thread.hpp>

 #include <boost/thread/mutex.hpp>

 #include <boost/bind.hpp>

 #include <iostream>

 boost::mutex io_mutex;

 void count(int id)
 {
         for (int i = 0; i < 10000; ++i)
         {
                 boost::mutex::scoped_lock lock(io_mutex);

                 std::cout << id << ": " << i << std::endl;

                 boost::this_thread::sleep(
 boost::posix_time::milliseconds( 1 * 1000 ) );

         }

 }

 int main(int argc, char* argv[])
 {
         boost::thread thrd1(boost::bind(&count, 1));

         boost::thread thrd2(boost::bind(&count, 2));

         thrd1.join();

         thrd2.join();

         return 0;

 }

 ubuntu server 12.04 x64 kernel 3.5.0-27-generic

 VIRT Momory use 164m, too much than ubuntu server 10.04 x64

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