1
0

Added auto-kill-with-dump to LeakFinder if the allocated memory grows over 1 GiB.

Only works on Windows and only present in Debug mode. Produces memdump.xml for analysis.
http://forum.mc-server.org/showthread.php?tid=826&pid=6948#pid6948

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1302 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2013-03-23 19:04:39 +00:00
parent 40bbe4df3a
commit 55ff2558d7
3 changed files with 144 additions and 82 deletions

View File

@@ -452,6 +452,14 @@ void cServer::ExecuteConsoleCommand(const AString & a_Cmd)
DumpUsedMemory(&Output);
return;
}
if (split[0].compare("killmem") == 0)
{
while (true)
{
new char[100 * 1024 * 1024]; // Allocate and leak 100 MiB in a loop -> fill memory and kill MCS
}
}
#endif
if (cPluginManager::Get()->ExecuteConsoleCommand(split))