persistentstorage/sql/OsLayer/FileBuf64.cpp
branchRCL_3
changeset 16 b6ab70c1385f
parent 15 fcc16690f446
child 21 28839de615b4
equal deleted inserted replaced
15:fcc16690f446 16:b6ab70c1385f
  1105 	const TInt KMinPageCount = 4;//the buffer capacity should be at least (KMinPageCount * page size) 
  1105 	const TInt KMinPageCount = 4;//the buffer capacity should be at least (KMinPageCount * page size) 
  1106 	                             //but not less than the original capacity.
  1106 	                             //but not less than the original capacity.
  1107 	const TInt KDefaultPageSize = 1024;//The journal header size is equal to 512 bytes, so it is not easy
  1107 	const TInt KDefaultPageSize = 1024;//The journal header size is equal to 512 bytes, so it is not easy
  1108                                        //to detect the 512 bytes page size. 
  1108                                        //to detect the 512 bytes page size. 
  1109 	
  1109 	
  1110 	__FBUF64_ASSERT(aRwDataLength >= 0, EFBufPanicRwDataLength);
  1110 	__FBUF64_ASSERT(aRwDataLength > 0, EFBufPanicRwDataLength);
  1111 	__FILEBUF64_INVARIANT();
  1111 	__FILEBUF64_INVARIANT();
  1112 	if(iOptimized || aRwDataLength == 0)
  1112 	if(iOptimized)
  1113 		{
  1113 		{
  1114 		__FILEBUF64_INVARIANT();
  1114 		__FILEBUF64_INVARIANT();
  1115 		return KErrNone;
  1115 		return KErrNone;
  1116 		}
  1116 		}
  1117 	if((aRwDataLength & (aRwDataLength - 1)) != 0 || aRwDataLength < KDefaultPageSize)
  1117 	if((aRwDataLength & (aRwDataLength - 1)) != 0 || aRwDataLength < KDefaultPageSize)