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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user