diff options
| author | hrydgard <hrydgard@gmail.com> | 2008-09-22 21:27:47 +0000 |
|---|---|---|
| committer | hrydgard <hrydgard@gmail.com> | 2008-09-22 21:27:47 +0000 |
| commit | 87f42c923764684e1e52675a3fc8319aaf509c0c (patch) | |
| tree | be6ae5597cb7baedd300b508dd70ee087a69f387 /Source/Core | |
| parent | b74e161a5ae5a63b7eca3ee17e3babc69d1fbc73 (diff) | |
Add a way to sprinkle heap integrity checks over Dolphin without breaking the linux build
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@613 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Common/Src/Common.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h index 242bd25694..42ace78ded 100644 --- a/Source/Core/Common/Src/Common.h +++ b/Source/Core/Common/Src/Common.h @@ -21,9 +21,13 @@ #define _CRTDBG_MAP_ALLOC
#define _CRTDBG_MAP_ALLOC_NEW
+#define CHECK_HEAP_INTEGRITY()
+
#ifdef _WIN32
#ifdef _DEBUG
#include <crtdbg.h>
+#undef CHECK_HEAP_INTEGRITY
+#define CHECK_HEAP_INTEGRITY() {if (!_CrtCheckMemory()) PanicAlert("memory corruption detected. see log.");}
#endif
#include "../../../PluginSpecs/CommonTypes.h"
|
