From 9743b7cafae3ac562f5a100f1a6735ca8740f1dd Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Wed, 31 Oct 2012 15:55:14 -0700 Subject: [PATCH] Add 'getTrackSize' --- src/TaggedCache.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/TaggedCache.h b/src/TaggedCache.h index a6c56efa4..fe7e03d24 100644 --- a/src/TaggedCache.h +++ b/src/TaggedCache.h @@ -44,6 +44,7 @@ public: int getTargetAge() const; int getCacheSize(); + int getTrackSize(); int getSweepAge(); void setTargetSize(int size); @@ -78,6 +79,12 @@ template int TaggedCache::getCac return mCache.size(); } +template int TaggedCache::getTrackSize() +{ + boost::recursive_mutex::scoped_lock sl(mLock); + return mMap.size(); +} + template void TaggedCache::sweep() { boost::recursive_mutex::scoped_lock sl(mLock);