summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index ee5d0a2bc..d533a6e45 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -12,8 +12,6 @@
*/
/* $Install: src/inspircd $(BINPATH) */
-
-
#include "inspircd.h"
#include <signal.h>
@@ -28,6 +26,13 @@
#ifndef RUSAGE_SELF
#define RUSAGE_SELF 0
#endif
+
+ /* CRT memory debugging */
+ #ifdef DEBUG
+ #define _CRTDBG_MAP_ALLOC
+ #include <stdlib.h>
+ #include <crtdbg.h>
+ #endif
#endif
#include <fstream>
@@ -306,7 +311,9 @@ InspIRCd::InspIRCd(int argc, char** argv)
FloodQuitUser(&HandleFloodQuitUser)
{
-
+#ifdef WIN32
+ _CrtSetDbgFlag ( _CRTDBG_CHECK_ALWAYS_DF | _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
+#endif
int found_ports = 0;
FailedPortList pl;
int do_version = 0, do_nofork = 0, do_debug = 0,