我有一个在 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