Subject: Re: Memory leaks
From: Mike Nordell (tamlin@algonet.se)
Date: Tue Jun 19 2001 - 21:37:57 CDT
Andrew Dunbar wrote:
>
> [I proposed memory checking before release]
>
> I'm all for it but can anybody recommend some good *free* memory
> leak tools for Windows and our other platforms. Then I can get to
> work on it myself (:
AFAIK there are none. Purify works by "instrumenting" the code, knowing what
kind of code MSVC creates and also using the pdb (Program DataBase) debug
files. Using another compiler or version it gets quite confused, like
sometimes crashing...
What we on the other hand would be able to do, is to use a specialized heap,
telling it that "all allocations from this point is on the behalf of xxyy"
and then when exiting telling it "xxyy is no more responsible for memory
allocations". Probably then by C++ RAII. At least it would remove all those
bad "UT_String" messages, but tell us "class FooBar allocated 'n' UT_strings
that it didn't release". Perhaps it could be useful?
The somewhat troublesome part is that we possibly need a new heap allocator.
Trust me (I've done it before) when I say that it's not something we want to
do. Even that it would make debug-builds of AbiWord become self-checking (in
debug-mode) it's not something we want to do.
... I think.
Please not I'm not proposing any of these changes, I'm mererly trying to
look at the alternatives.
/Mike
This archive was generated by hypermail 2b25 : Tue Jun 19 2001 - 21:37:36 CDT