Added defines and includes required to enable MSVC memory debugging features
authorbjasspa <bjasspa@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 1 Jul 2012 13:21:46 +0000 (13:21 +0000)
committerbjasspa <bjasspa@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 1 Jul 2012 13:21:46 +0000 (13:21 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@5173 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/debug.h

index dda8c8d..036c087 100644 (file)
@@ -29,6 +29,13 @@ extern "C" {
 
 #ifdef _MSC_VER
 #define __PRETTY_FUNCTION__ __FUNCTION__
+
+/* Uncomment the following define to enable MSVC's memory debugging support */ 
+/*#define _CRTDBG_MAP_ALLOC*/
+#ifdef _CRTDBG_MAP_ALLOC
+#include <stdlib.h>
+#include <crtdbg.h>
+#endif
 #endif
 
 extern int debug_level;