mirror of
https://github.com/ksherlock/profuse.git
synced 2026-09-24 15:46:18 +00:00
use shared_ptr for device, cache
git-svn-id: https://profuse.googlecode.com/svn/branches/v2@345 aa027e90-d47c-11dd-86d7-074df07e0730
This commit is contained in:
@@ -233,9 +233,9 @@ void BlockDevice::sync(TrackSector ts)
|
||||
}
|
||||
*/
|
||||
|
||||
BlockCache *BlockDevice::createBlockCache()
|
||||
BlockCachePointer BlockDevice::createBlockCache()
|
||||
{
|
||||
unsigned b = blocks();
|
||||
unsigned size = std::max(16u, b / 16);
|
||||
return new ConcreteBlockCache(this, size);
|
||||
return ConcreteBlockCache::Create(shared_from_this(), size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user