summaryrefslogtreecommitdiff
path: root/src/cache.h
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-01-06 18:10:33 (GMT)
committerMarius Kintel <marius@kintel.net>2012-01-09 23:01:50 (GMT)
commitfe3362faf825016606a8bcd60669c16965b0599c (patch)
tree1cfccc34acf462d9faefdfb8662c48cde878cbf9 /src/cache.h
parentc4695872392a6d1415752934be55c81de57de87e (diff)
Started on cache size management: Let cache sizes be read from Preferences, measure cache sizes in bytes
Diffstat (limited to 'src/cache.h')
-rw-r--r--src/cache.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cache.h b/src/cache.h
index 284c6da..ae12647 100644
--- a/src/cache.h
+++ b/src/cache.h
@@ -46,6 +46,7 @@
#define CACHE_H
#include <boost/unordered_map.hpp>
+#include "printutils.h"
template <class Key, class T>
class Cache
@@ -175,6 +176,9 @@ void Cache<Key,T>::trim(int m)
while (n && total > m) {
Node *u = n;
n = n->p;
+#ifdef DEBUG
+ PRINTF("Trimming cache: %p", u->t);
+#endif
unlink(*u);
}
}
contact: Jan Huwald // Impressum