摘要: // The release libs don't include FPO debug information, so FPO// optimization will interfere with stack walking.#pragma optimize ("y", off) 阅读全文
posted @ 2015-11-08 22:21 Through 阅读(291) 评论(0) 推荐(0) 编辑
摘要: VC中,如果隐式链接的lib或dll未被引用,编译器并不会去生成加载该lib或dll的代码,从VLD1.0版本中看到可以通过如下方式强制引用:// Force a symbolic reference to the global VisualLeakDetector class object fro... 阅读全文
posted @ 2015-11-07 23:15 Through 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 近期想学习下VLD的实现,打算从最简单的V1.0版本看起。以下是V1.0版本自己尝试翻译下,最新的2.x版本似乎强大了很多。简介 Visual C++提供了内置的内存检测机制,但其充其量只满足了最小定位需求。VLD工具定位为内置内存泄漏的替代,提供了如下特性:泄漏内存块的全调用栈回溯,包括文件及其... 阅读全文
posted @ 2015-11-07 22:04 Through 阅读(359) 评论(0) 推荐(0) 编辑
摘要: Visual Studio 2005 This topic describes how to set up C++ applications to target 64-bit platforms using project configurations available in the Visual Studio Integrated Development Environment (IDE)... 阅读全文
posted @ 2015-11-07 16:54 Through 阅读(388) 评论(0) 推荐(0) 编辑
摘要: 1. 使能内存泄漏检测#define _CRTDBG_MAP_ALLOC#include #include 注1:语句顺序不能修改;注2:仅对DEBUG版本有效注3:#define语句可以去掉,但leak dump会丢失细节信息,如:泄漏的代码文件及行号2. 打印泄漏内存报告在合适的地方调用下面的语... 阅读全文
posted @ 2015-11-07 16:42 Through 阅读(1295) 评论(0) 推荐(0) 编辑