1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-12-04 17:21:31 +03:00

Mayaqua: ability to toggle memory tracking at runtime, various logic improvements

This commit is contained in:
Davide Beatrici
2018-11-18 02:57:14 +01:00
parent 4e7d946214
commit c48de5924a
6 changed files with 53 additions and 152 deletions

View File

@ -552,8 +552,11 @@ void InitMayaqua(bool memcheck, bool debug, int argc, char **argv)
// Initialize the Kernel status
InitKernelStatus();
// Initialize the tracking
InitTracking();
if (IsTrackingEnabled())
{
// Initialize the tracking
InitTracking();
}
// Initialization of thread pool
InitThreading();
@ -696,22 +699,23 @@ void FreeMayaqua()
// Release of thread pool
FreeThreading();
#ifndef VPN_SPEED
// Show the kernel status
if (g_debug)
if (IsTrackingEnabled())
{
PrintKernelStatus();
}
// Show the kernel status
if (g_debug)
{
PrintKernelStatus();
}
// Display the debug information
if (g_memcheck)
{
PrintDebugInformation();
}
#endif // VPN_SPEED
// Display the debug information
if (g_memcheck)
{
PrintDebugInformation();
}
// Release the tracking
FreeTracking();
// Release the tracking
FreeTracking();
}
// Release of the kernel status
FreeKernelStatus();