summaryrefslogtreecommitdiffstats
path: root/source/Server.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-23 20:04:39 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-23 20:04:39 +0100
commit55ff2558d7a88cba8ba9c1af9c4c26831aaadb82 (patch)
treee703da542d5931807f44e0d53c3b79d3e7bb7b09 /source/Server.cpp
parentIgnoring the generated memdump.xml file (diff)
downloadcuberite-55ff2558d7a88cba8ba9c1af9c4c26831aaadb82.tar
cuberite-55ff2558d7a88cba8ba9c1af9c4c26831aaadb82.tar.gz
cuberite-55ff2558d7a88cba8ba9c1af9c4c26831aaadb82.tar.bz2
cuberite-55ff2558d7a88cba8ba9c1af9c4c26831aaadb82.tar.lz
cuberite-55ff2558d7a88cba8ba9c1af9c4c26831aaadb82.tar.xz
cuberite-55ff2558d7a88cba8ba9c1af9c4c26831aaadb82.tar.zst
cuberite-55ff2558d7a88cba8ba9c1af9c4c26831aaadb82.zip
Diffstat (limited to 'source/Server.cpp')
-rw-r--r--source/Server.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/Server.cpp b/source/Server.cpp
index 24d999b31..ce631f754 100644
--- a/source/Server.cpp
+++ b/source/Server.cpp
@@ -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))