diff options
Diffstat (limited to 'src/progs/manaplus/actions/commands.cpp')
-rw-r--r-- | src/progs/manaplus/actions/commands.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/progs/manaplus/actions/commands.cpp b/src/progs/manaplus/actions/commands.cpp index ff24d6bc3..57f5125b2 100644 --- a/src/progs/manaplus/actions/commands.cpp +++ b/src/progs/manaplus/actions/commands.cpp @@ -85,6 +85,8 @@ #include "utils/parameters.h" #include "utils/process.h" +#include <malloc.h> + #include "debug.h" namespace Actions @@ -2200,4 +2202,17 @@ impHandler(addSkillShortcut) return true; } +impHandler0(trimMemory) +{ +#ifdef HAVE_MALLOC_TRIM + malloc_trim(0); +#else + localChatTab->chatLog(_("Trim memory not supported"), + ChatMsgType::BY_SERVER, + IgnoreRecord_false, + TryRemoveColors_true); +#endif + return true; +} + } // namespace Actions |