From the description in
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q268343
, I would expect the log to include every heap allocation.
However, I did not see an allocation that I knew to leak,
even after using a debugger to step a few lines past the
allocation and then running UMDH.
Does something simply run out of space and I need to
increase some parameter? For instance, I wondered about
this comment at the beginning the UMDH log: "Database size
00200000".
I build with VC++ 6.0 and have tried both Windows 2000 SP2
and SP3. I have tried both the old UMDH that Q268343 used
to point to and the new UMDH that came with the Debugging
tools for Windows (dbg_x86_6.0.17.0.exe).
Using "umdh -t:0" to explicitly give a threshold of 0 (the
default according to the documentation) did not make any
difference.
Thanks, J Avery
If it doesn't show the stack trace, it's probably because
of the FPO issues. If you allocate memory through CRT
or OLE functions, the stack traces are usually incomplete
because these functions are FPO optimized.
Would routines compiled without optimization have FPO
issues? Would UMDH omit entirely a stacktrace that had a
Frame Pointer Omission?
Thanks, J Avery
>.
>
> Would routines compiled without optimization have FPO
> issues?
No. But most likely the problem is not with your functions.
It's internal CRT and OLE alloction routines that are FPO
optimized.
> Would UMDH omit entirely a stacktrace that had a
> Frame Pointer Omission?
Usually the stack trace will be incomplete. This is typical
example:
00008470 bytes in 0x43 allocations (@ 0x00000028 + 0x000079F8) by:
BackTrace00124
ntdll!RtlDebugAllocateHeap+0x000000FD
ntdll!RtlAllocateHeapSlowly+0x0000005A
ntdll!RtlAllocateHeap+0x000008C2
You could try running UMDH on a full debug build
so that all C++ allocations go through msvcrtd.dll
which I think is not FPO optimized.
You might also get better results on a checked NT build.
>.
>
To "help" the function that captures the stack backtrace to deal with
optimized code,
you can try to "decorate" your functions with the alloca-trick
HRESULT Foo()
{
DWORD * pDW = (DWORD *)_alloca(sizeof(DWORD));
Class * p = new Class();
return S_OK;
}
this usually helps a lot in having good stack traces.
--
This posting is provided "As Is" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"J Avery" <jkav...@yahoo.com> wrote in message
news:a6cf01c25065$726fe550$3aef2ecf@TKMSFTNGXA09...
>.
>
--
This posting is provided "As Is" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"J Avery" <jkav...@yahoo.com> wrote in message
news:c8da01c25352$b6a55f30$a4e62ecf@tkmsftngxa06...