diff options
Diffstat (limited to 'FoundationEx/MemDebug.cpp')
-rw-r--r-- | FoundationEx/MemDebug.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/FoundationEx/MemDebug.cpp b/FoundationEx/MemDebug.cpp index 2694b33..3e1c0f5 100644 --- a/FoundationEx/MemDebug.cpp +++ b/FoundationEx/MemDebug.cpp @@ -61,6 +61,21 @@ static HANDLE mem_log_file = 0; #define CrtClrDebugField(a) _CrtSetDbgFlag(~(a) & _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG)) #endif +inline void* __cdecl operator new(unsigned int s, const char* f, int l) +{ + return ::operator new(s, 1, f, l); +} + +inline void* __cdecl operator new(unsigned int s) +{ + return ::operator new(s, 1, __FILE__, __LINE__); +} + +inline void __cdecl operator delete(void* p, const char*, int) +{ + ::operator delete(p); +} + static void heapdump() { _HEAPINFO hinfo; |