summaryrefslogtreecommitdiff
path: root/src/resources/memorymanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/memorymanager.cpp')
-rw-r--r--src/resources/memorymanager.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/resources/memorymanager.cpp b/src/resources/memorymanager.cpp
index a07aaa750..a88d53b79 100644
--- a/src/resources/memorymanager.cpp
+++ b/src/resources/memorymanager.cpp
@@ -20,7 +20,12 @@
#include "resources/memorymanager.h"
+#include "logger.h"
+
+#include "resources/resourcemanager.h"
+
#include <SDL_video.h>
+#include <string>
#include "debug.h"
@@ -49,4 +54,18 @@ void MemoryManager::printMemory(const int level A_UNUSED,
const int localSum A_UNUSED,
const int childsSum A_UNUSED)
{
+ std::string str(level, ' ');
+ logger->log("%s%d = %d + %d",
+ str.c_str(),
+ localSum + childsSum,
+ localSum,
+ childsSum);
+}
+
+void MemoryManager::printAllMemory()
+{
+ if (!logger)
+ return;
+ if (resourceManager)
+ resourceManager->calcMemory(0);
}