leak in debug only



Our (very large) C++ program seems to leak when compiled in debug mode
only, not in optimized mode.  Is this a common or known problem?  I've
done quite a bit of googling around this issue and can't find anything,
including in the mail.gnome.org archives.  We are using GTK 2.2.4 under
MontaVista Linux, for the ARM PXA270 architecture.  This seems to indicate
that we don't have a problem for release, but memory use grows quickly
enough in debug mode that you can't do much before running out of memory
on our 64 MB embedded systems and locking up therefore.

By the way, we have investigated all the following leak tools, all of
which either fail or seem inapplicable to our system:

The following tools have actually been run:

        1.  dmalloc -- Works but only reports leak information for malloc,
not for new, so it's a C tool virtually useless with C++.

        2.  memwatch -- Reported a few actual leaks and thousands of
others that don't seem to be leaks.  Missed some deliberate leaks put in
to test it.

        3.  mtrace -- Works but only reports the addresses of memory
blocks that are allocated and freed, not the locations from which they
were allocated.

The following tools have been investigated to the point of attempted
build:

        4.  LeakTracer -- Requires support for __builtin_return_address
arguments that are greater than 0, which our system doesn't have.

The following tools have been investigated in online documentation:

        5.  Valgrind -- Supported only on a few architectures, such as
x86. 

        6.  Memprof -- Described as not very portable.

        7.  Debauch -- No longer maintained or even available, apparently.

We have sunk a lot of time into researching leak tools without success.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]