00001 #ifndef _DebugHeap_H_
00002 #define _DebugHeap_H_
00003
00004 #ifdef _MEMORY_DEBUG
00005 #pragma warning(disable : 4291)
00006 #include <CRTDBG.H>
00007 #define DEBUG_NEW new(_NORMAL_BLOCK, THIS_FILE, __LINE__)
00008 #define DEBUG_MALLOC(size) _malloc_dbg(size, _NORMAL_BLOCK, THIS_FILE, __LINE__)
00009 #undef THIS_FILE
00010
00011 #define __new new(_NORMAL_BLOCK, __FILE__, __LINE__)
00012 #define __malloc(size) _malloc_dbg(size, _NORMAL_BLOCK, __FILE__, __LINE__)
00013 #define __free(o) _free_dbg(o, _NORMAL_BLOCK)
00014 #endif
00015
00016 #endif