问题描述
我正在调试GC堆损坏,并进入要尝试在WinDbg + PageHeap + AppVerifier + GCStress下运行程序的步骤.
我在 http://social.msdn.microsoft.com上找到/Forums/zh-CN/clr/thread/0fcb5bb1-0cd8-40e4-96d9-f0cb8b6cdbdf [ ^ ]我可以启用GCStress,例如:
I am debugging a GC heap corruption and came to the step where I want to try running the program under WinDbg+PageHeap+AppVerifier+GCStress.
I found at http://social.msdn.microsoft.com/Forums/en/clr/thread/0fcb5bb1-0cd8-40e4-96d9-f0cb8b6cdbdf[^] that I can enable GCStress like this:
<small>reg.exe add "HKLM\SOFTWARE\Microsoft\.NETFramework" /f /v HeapVerify /t REG_DWORD /d 1 <br />
reg.exe add "HKLM\SOFTWARE\Microsoft\.NETFramework" /f /v StressLog /t REG_DWORD /d 1 <br />
reg.exe add "HKLM\SOFTWARE\Microsoft\.NETFramework" /f /v GCStress /t REG_DWORD /d 3 <br />
reg.exe add "HKLM\SOFTWARE\Microsoft\.NETFramework" /f /v FastGcStress /t REG_DWORD /d 2</small>
[尝试这种方法-永远启动程序,我从注册表中删除了最后两个条目以使其正常工作,这可能是该方法本身存在问题. ]
或在 http://social.msdn.microsoft.com/论坛/en/clr/thread/33920b39-690c-42c8-b04a-0f1f7176835a [ ^ ]描述了另一种方法:
[ trying this method - takes the program forever to launch, I deleted the last two entries from the registry to have it work, probably something is wrong with the approach itself. ]
or at http://social.msdn.microsoft.com/Forums/en/clr/thread/33920b39-690c-42c8-b04a-0f1f7176835a[^] described the other method:
<br />
<small>(DWORD) StressLog = 1 <br />
(DWORD) LogFacility = 0xffffffff <br />
(DWORD) StressLogSize = 65536</small>
Which way is correct or is there another correct way?
推荐答案
<configuration>
<runtime>
<gcConcurrent enabled="false"/>
</runtime>
</configuration>
这篇关于.NET调试:如何在Win-7中启用GCStress?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!