summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-26 22:45:55 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-26 22:45:55 +0300
commit80bbbc4c18273e0d1116d7e924d1df068a5d63d5 (patch)
treebef2f6458ee7fc5079c1993921abdfc4926570bb /src/actions
parent918e2a5cf24311e87b0dc754770480727f77eac3 (diff)
downloadplus-80bbbc4c18273e0d1116d7e924d1df068a5d63d5.tar.gz
plus-80bbbc4c18273e0d1116d7e924d1df068a5d63d5.tar.bz2
plus-80bbbc4c18273e0d1116d7e924d1df068a5d63d5.tar.xz
plus-80bbbc4c18273e0d1116d7e924d1df068a5d63d5.zip
Add chat command for print memory usage. For now only report about resources.
New chat command: /dumpmemoryusage
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/actions.cpp7
-rw-r--r--src/actions/actions.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index 1f7df9c9d..1e7a9ad5b 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -96,6 +96,7 @@
#include "net/tradehandler.h"
#include "resources/iteminfo.h"
+#include "resources/memorymanager.h"
#include "resources/resourcemanager.h"
#include "const/resources/skill.h"
@@ -1783,4 +1784,10 @@ impHandler(seen)
return true;
}
+impHandler0(dumpMemoryUsage)
+{
+ memoryManager.printAllMemory();
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/actions.h b/src/actions/actions.h
index 7d583527b..a09022ce7 100644
--- a/src/actions/actions.h
+++ b/src/actions/actions.h
@@ -113,6 +113,7 @@ namespace Actions
decHandler(resetGameModifiers);
decHandler(barToChat);
decHandler(seen);
+ decHandler(dumpMemoryUsage);
} // namespace Actions
#undef decHandler