Boost logo

Boost Users :

From: Zian Smith (smith7005_at_[hidden])
Date: 2008-03-06 10:38:08


Hello,

I'm using gcc 3.2.3, Boost 1.33.1 on RedHat Linux 3.4.6. I can clearly
see the process memory usage increase as the program runs (using tools
like ps/pmap/top etc). Any ideas or tips to help me figure out what's
going on?

-Thanks!

--- Peter Dimov <pdimov_at_[hidden]> wrote:

> Zian Smith:
>
> > Hello,
> >
> > The following program seems to exhibit a memory leak. The program
> > itself does nothing. Can someone explain please? I'm using boost
> 1.33.1
>
> FWIW, I'm not seeing any leaks with MSVC 7.1 and the current Boost
> trunk.
>
> ...
>
> > #include "boost/lambda/bind.hpp"
> > #include "boost/shared_ptr.hpp"
> >
> > void do_nothing(boost::shared_ptr<int> intPtr)
> > {
> >
> > }
> >
> > int main()
> > {
> > while(1)
> > {
> > char c[10];
> > boost::shared_ptr<int> intPtr(new int);
> > std::for_each(c, c+10,
> boost::lambda::bind(do_nothing,
> > intPtr));
> > }
> > }
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


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