Boost logo

Boost :

Subject: Re: [boost] [unordered] valgrind reports "possibly lost" memory when not destroying the container
From: Brandon Kohn (blkohn_at_[hidden])
Date: 2014-07-04 10:01:11


On 7/4/2014 02:18 AM, Adam Romanek wrote:
> - is it possible to force some simpler but maybe more expensive memory
> management in Boost.Unordered to suppress these "possibly lost" reports?
> - what other options do I have?

If you have a problem where the containers are consuming too many
resources, than you should consider ways to release them. Valgrind is
just doing its job in reporting these blocks. They are in use when the
program exits. Memory management isn't going to change that.

Perhaps you could write a parser that could digest the valgrind outputs
and filter out these warnings? Bear in mind though that these warnings
could be useful if you have a long running process. Sometimes these
things can build up over time.

Frankly, it seems like it would be easier to manage these such that they
are destroyed properly on program exit (read as not a crash.)

HTH

Brandon


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk