1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-09-20 02:09:25 +03:00

Debug flag and test mode improvements

1. ifdef DEBUG -> defined(_DEBUG) || defined(DEBUG)
In VC++ compilers, the macro is "_DEBUG", not "DEBUG".

2. If set memcheck = true, the program will be vitally slow since it will log all malloc() / realloc() / free() calls to find the cause of memory leak.
For normal debug we set memcheck = false.
Please set memcheck = true if you want to test the cause of memory leaks.
This commit is contained in:
Daiyuu Nobori
2018-10-08 11:03:58 +09:00
committed by Davide Beatrici
parent 66b906378f
commit 8abcf3d0a9
8 changed files with 48 additions and 18 deletions

View File

@ -1635,13 +1635,16 @@ int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, char *CmdLine, int CmdShow)
{
INSTANCE *instance;
InitProcessCallOnce();
#ifdef DEBUG
#if defined(_DEBUG) || defined(DEBUG) // In VC++ compilers, the macro is "_DEBUG", not "DEBUG".
is_debug = true;
#else
is_debug = false;
#endif
MayaquaMinimalMode();
InitMayaqua(is_debug, is_debug, 0, NULL);
// If set memcheck = true, the program will be vitally slow since it will log all malloc() / realloc() / free() calls to find the cause of memory leak.
// For normal debug we set memcheck = false.
// Please set memcheck = true if you want to test the cause of memory leaks.
InitMayaqua(false, is_debug, 0, NULL);
InitCedar();
ViSetSkip();
ViLoadStringTables();