vs 如何调式我就不说了,这里主要写一些我在工作的过程中遇到的一些问题!!!
- stl::map 中的 clear 在 Release 版本中运行会很快,但是,在Debug 中调式会很慢,我在google上找到了解决的方案,原文如下:`
Trying setting the environment variable _NO_DEBUG_HEAP=1 in the program’s initial environment. This disables Windows’ internal debug heap, which might make it harder to debug memory corruption problems.
This KB article mentions the flag, and you can infer that the default (low-fragmentation heap) is disabled if the program is run in a debugger without that environment variable. See also this blog post, which discusses how the debug heap can slow down their program by 3-5 times.
`
文章详细介绍了如何解决STL::map在Debug版本中运行速度较慢的问题,通过设置环境变量_NO_DEBUG_HEAP=1来禁用Windows内部的调试堆,从而可能更易于调试内存破坏问题。此外,文章还提到了使用调试堆可能导致程序运行速度降低3-5倍的情况。
4829

被折叠的 条评论
为什么被折叠?



