在调试器中运行会将内存分配库更改为执行更多检查的内存分配库.除了内存分配和解除分配之外什么都不做的程序将比"正常"程序遭受更多的痛苦.
编辑 刚刚尝试在VS下运行程序我得到一个看起来像的调用堆栈
ntdll.dll!_RtlpValidateHeapEntry@12() + 0x117 bytes ntdll.dll!_RtlDebugFreeHeap@12() + 0x97 bytes ntdll.dll!_RtlFreeHeapSlowly@12() + 0x228bf bytes ntdll.dll!_RtlFreeHeap@12() + 0x17646 bytes msvcr90d.dll!_free_base(void * pBlock=0x0061f6e8) Line 109 + 0x13 bytes msvcr90d.dll!_free_dbg_nolock(void * pUserData=0x0061f708, int nBlockUse=1) msvcr90d.dll!_free_dbg(void * pUserData=0x0061f708, int nBlockUse=1) msvcr90d.dll!operator delete(void * pUserData=0x0061f708) desc.exe!std::allocator::deallocate(int * _Ptr=0x0061f708, unsigned int __formal=4) desc.exe!std::vector >::_Tidy() Line 1134 C++
其中显示了ntdll.dll中的调试功能以及正在使用的C运行时.
在调试器中运行会将内存分配库更改为执行更多检查的内存分配库.除了内存分配和解除分配之外什么都不做的程序将比"正常"程序遭受更多的痛苦.
编辑 刚刚尝试在VS下运行程序我得到一个看起来像的调用堆栈
ntdll.dll!_RtlpValidateHeapEntry@12() + 0x117 bytes ntdll.dll!_RtlDebugFreeHeap@12() + 0x97 bytes ntdll.dll!_RtlFreeHeapSlowly@12() + 0x228bf bytes ntdll.dll!_RtlFreeHeap@12() + 0x17646 bytes msvcr90d.dll!_free_base(void * pBlock=0x0061f6e8) Line 109 + 0x13 bytes msvcr90d.dll!_free_dbg_nolock(void * pUserData=0x0061f708, int nBlockUse=1) msvcr90d.dll!_free_dbg(void * pUserData=0x0061f708, int nBlockUse=1) msvcr90d.dll!operator delete(void * pUserData=0x0061f708) desc.exe!std::allocator::deallocate(int * _Ptr=0x0061f708, unsigned int __formal=4) desc.exe!std::vector >::_Tidy() Line 1134 C++
其中显示了ntdll.dll中的调试功能以及正在使用的C运行时.