Boost logo

Boost Users :

From: pete_at_[hidden]
Date: 2007-01-18 01:33:17


I've been trying to track down memory leak being reported by valgrind.
There are others out there who appear to have the same problem, but I
can't find any reference to it in the boost list archives.

I know valgrind can be inaccurate, but it seems pretty accurate every where
else in my program. I've narrowed it down to something like this:

-----------------
  #include <boost/bind.hpp>
  #include <boost/thread.hpp>
  #include <iostream>

    void fn(){
      return;
      }

    int main()
      {
          boost::thread_group thrd;
          thrd.create_thread(boost::bind(&fn));
          thrd.join_all();
          return 0;
      }

-----------------

Valgrind is showing this:

...
by 0x4053D76: boost::thread_group::create_thread(boost::function0<void,
std::allocator<boost::function_base> > const&) (in
/usr/lib/libboost_thread-mt.so.1.33.1)

LEAK SUMMARY:
==22004== definitely lost: 0 bytes in 0 blocks.
==22004== possibly lost: 144 bytes in 1 blocks.
==22004== still reachable: 0 bytes in 0 blocks.
==22004== suppressed: 0 bytes in 0 blocks.

Any clues? Thoughts?

Thanks,

Pete


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net