enforce smart pointers for block cache.

git-svn-id: https://profuse.googlecode.com/svn/branches/profuse_interim@344 aa027e90-d47c-11dd-86d7-074df07e0730
This commit is contained in:
ksherlock
2011-02-22 02:06:56 +00:00
parent c44145f551
commit c9b260b753
9 changed files with 26 additions and 9 deletions
+7 -2
View File
@@ -9,7 +9,9 @@ namespace Device {
class ConcreteBlockCache : public BlockCache {
public:
ConcreteBlockCache(BlockDevicePointer device, unsigned size = 16);
static BlockCachePointer Create(BlockDevicePointer device, unsigned size = 16);
virtual ~ConcreteBlockCache();
virtual void sync();
@@ -21,8 +23,11 @@ public:
virtual void markDirty(unsigned block);
private:
ConcreteBlockCache(BlockDevicePointer device, unsigned size);
struct Entry {
unsigned block;
unsigned count;