equal
deleted
inserted
replaced
124 { |
124 { |
125 //=========================== create data WT cache that is primarily used for caching exacutable modules' UIDs |
125 //=========================== create data WT cache that is primarily used for caching exacutable modules' UIDs |
126 const TUint32 KUidCachePageSzLog2 = 9; //-- 512 bytes in page |
126 const TUint32 KUidCachePageSzLog2 = 9; //-- 512 bytes in page |
127 const TUint32 KUidCachePages = 64; //-- 64 pages; total cache size is 32K |
127 const TUint32 KUidCachePages = 64; //-- 64 pages; total cache size is 32K |
128 |
128 |
129 iUidCache = CMediaWTCache::NewL(iDrive, KUidCachePages, KUidCachePageSzLog2); |
129 iUidCache = CMediaWTCache::NewL(iDrive, KUidCachePages, KUidCachePageSzLog2, 0); |
130 |
130 |
131 |
131 |
132 //=========================== create directory cache |
132 //=========================== create directory cache |
133 |
133 |
134 //-- Get dir. cache parameters from config. They may be set in estart.txt for a specified drive. |
134 //-- Get dir. cache parameters from config. They may be set in estart.txt for a specified drive. |
183 |
183 |
184 // cache memory client is connected via name |
184 // cache memory client is connected via name |
185 TBuf<0x20> clientName = _L("CACHE_MEM_CLIENT:"); |
185 TBuf<0x20> clientName = _L("CACHE_MEM_CLIENT:"); |
186 clientName.Append('A'+iFatMount->DriveNumber()); |
186 clientName.Append('A'+iFatMount->DriveNumber()); |
187 |
187 |
188 TRAPD(err, ipDirCache = CDynamicDirCache::NewL(iDrive, CacheSizeMinInPages, CacheSizeMaxInPages, PageDataSizeLog2, clientName)); |
188 TRAPD(err, ipDirCache = CDynamicDirCache::NewL(iDrive, CacheSizeMinInPages, CacheSizeMaxInPages, PageDataSizeLog2, KDefSectorSzLog2, clientName)); |
189 if (err == KErrNone) |
189 if (err == KErrNone) |
190 return; |
190 return; |
191 |
191 |
192 //-- fall back to constructing old type of cache |
192 //-- fall back to constructing old type of cache |
193 |
193 |
195 #endif // USE_DP_DIR_CACHE |
195 #endif // USE_DP_DIR_CACHE |
196 |
196 |
197 //=========================== create legacy type of the directory cache |
197 //=========================== create legacy type of the directory cache |
198 ASSERT(!ipDirCache); |
198 ASSERT(!ipDirCache); |
199 |
199 |
200 ipDirCache = CMediaWTCache::NewL(iDrive, numPages, pageSzLog2); |
200 ipDirCache = CMediaWTCache::NewL(iDrive, numPages, pageSzLog2, KDefSectorSzLog2); |
201 __PRINT3(_L("CDirCache::NewL(drive: %C, NumPages=%d, PageSize=%u)"), 'A'+iFatMount->DriveNumber(), numPages, 1<<pageSzLog2); |
201 __PRINT3(_L("CDirCache::NewL(drive: %C, NumPages=%d, PageSize=%u)"), 'A'+iFatMount->DriveNumber(), numPages, 1<<pageSzLog2); |
202 |
202 |
203 } |
203 } |
204 |
204 |
205 //------------------------------------------------------------------------------------- |
205 //------------------------------------------------------------------------------------- |