diff options
author | Marius Kintel <marius@kintel.net> | 2012-01-09 22:59:53 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-01-09 23:01:50 (GMT) |
commit | 22b98cd05217acf0bf78969a3baaf4568781670f (patch) | |
tree | 005e046609df534e12f202e2233a3ba20b1d1abc /src/cache.h | |
parent | c513ad9a287ee1b5cc5e456c665792958649e2ed (diff) |
Updated cache handling to keep the root node and issue a warning if it didn't fit into the cache. Better debug output
Diffstat (limited to 'src/cache.h')
-rw-r--r-- | src/cache.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cache.h b/src/cache.h index ae12647..27eb1f9 100644 --- a/src/cache.h +++ b/src/cache.h @@ -46,6 +46,7 @@ #define CACHE_H #include <boost/unordered_map.hpp> +#include <boost/format.hpp> #include "printutils.h" template <class Key, class T> @@ -177,7 +178,7 @@ void Cache<Key,T>::trim(int m) Node *u = n; n = n->p; #ifdef DEBUG - PRINTF("Trimming cache: %p", u->t); + PRINTF("Trimming cache: %s (%d bytes)", str(boost::format("%1%") % *u->keyPtr).c_str(), u->c); #endif unlink(*u); } |