C++内存溢出查询方法

来源:互联网 发布:东非大裂谷 知乎 编辑:程序博客网 时间:2024/06/15 10:32

Win32平台


1.mfc

#include <stdlib.h>#include <crtdbg.h>#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)#define new DEBUG_NEW//方法中_CrtDumpMemoryLeaks()



2.普通C应用

#define  _CRTDBG_MAP_ALLOC#include <stdlib.h>#include <crtdbg.h>方法中_CrtDumpMemoryLeaks()


3.VDL


待续,详细的换完新电脑补上


0 0
原创粉丝点击