【发布时间】:2012-12-18 05:58:23
【问题描述】:
我有一个在 Server 2003 下作为服务运行的 64 位应用程序。
当我附加 VS Profiler 或 windbg 时,我看到了很多如下所示的调用堆栈。我知道在调试器(或分析器)中生成的进程使用调试堆等...但情况并非如此,因为此服务是由操作系统启动的,我只是附加到它。
我不明白它为什么要展开堆栈。分析器显示,在这方面花费了可衡量的时间。更多信息:
• 这些是使用 vc9 构建的版本位,在 Server 2003 上运行。
• 系统环境变量_NO_DEBUG_HEAP 设置为1。
• 我正在使用 Microsoft 符号服务器。
为什么要捕获堆栈跟踪?它似乎正在记录它..但我找不到在哪里。
我的目标是验证应用程序是否真的在展开堆栈,如果是这样,请尽量避免它。
有什么想法吗?
调用栈
ntdll!RtlVirtualUnwind
ntdll!RtlpWalkFrameChain
ntdll!RtlCaptureStackBackTrace
ntdll!RtlpCaptureStackTraceForLogging
ntdll!RtlLogStackBackTrace
ntdll!RtlDebugAllocateHeap
ntdll!RtlAllocateHeapSlowly
ntdll!RtlAllocateHeap
MSVCR90!malloc
MSVCR90!operator new
【问题讨论】:
标签: c++ windows heap-memory callstack stack-unwinding