]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd.cpp
Apply patches to remove 200-odd dll limit on windows, made by GreenReaper, lots of...
[user/henk/code/inspircd.git] / src / inspircd.cpp
index ee5d0a2bc2d8507b76a39a857bd77e136f4c933f..d533a6e450b035157bdb5d81f6a0adbfbf96029f 100644 (file)
@@ -12,8 +12,6 @@
  */
 
 /* $Install: src/inspircd $(BINPATH) */
-
-
 #include "inspircd.h"
 #include <signal.h>
 
        #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,