Lines Matching refs:sz

15604 SQLITE_PRIVATE void sqlite3PCacheBufferSetup(void *, int sz, int n);
16213 u16 sz; /* Size of each buffer in bytes */ member
26812 return db->lookaside.sz;
26864 memset(p, 0xaa, db->lookaside.sz);
27026 if( n>db->lookaside.sz ){
27064 if( isLookaside(db,p) && n<=db->lookaside.sz ) return p;
27075 memcpy(pNew, p, db->lookaside.sz);
31640 int i, sz;
31641 sz = sqlite3Strlen30(z);
31642 for(i=sz-1; i>0 && z[i]!='/' && z[i]!='.'; i--){}
31643 if( z[i]=='.' && ALWAYS(sz>i+4) ) memmove(&z[i+1], &z[sz-3], 4);
33330 static int robust_ftruncate(int h, sqlite3_int64 sz){
33337 if( sz>(sqlite3_int64)0x7FFFFFFF ){
33341 do{ rc = osFtruncate(h,sz); }while( rc<0 && errno==EINTR );
44815 sqlite3_int64 sz; /* Current size of wal-index file */
44823 rc = winFileSize((sqlite3_file *)&pShmNode->hFile, &sz);
44830 if( sz<nByte ){
46377 static void xorMemory(EntropyGatherer *p, unsigned char *x, int sz){
46379 for(j=0, k=p->i; j<sz; j++){
46384 p->nXor += sz;
46755 sqlite3_int64 sz; /* Size of the file */
46866 if( iOfst+iAmt>p->sz ){
46868 if( iOfst<p->sz ) memcpy(zBuf, p->aData+iOfst, p->sz - iOfst);
46906 if( iOfst+iAmt>p->sz ){
46913 if( iOfst>p->sz ) memset(p->aData+p->sz, 0, iOfst-p->sz);
46914 p->sz = iOfst+iAmt;
46929 if( NEVER(size>p->sz) ) return SQLITE_FULL;
46930 p->sz = size;
46946 *pSize = p->sz;
46981 *(char**)pArg = sqlite3_mprintf("memdb(%p,%lld)", p->aData, p->sz);
46986 if( iLimit<p->sz ){
46990 iLimit = p->sz;
47027 if( iOfst+iAmt>p->sz ){
47195 sqlite3_int64 sz;
47215 if( piSize ) *piSize = p->sz;
47219 pOut = sqlite3_malloc64( p->sz );
47220 if( pOut ) memcpy(pOut, p->aData, p->sz);
47235 sz = sqlite3_column_int64(pStmt, 0)*szPage;
47236 if( piSize ) *piSize = sz;
47240 pOut = sqlite3_malloc64( sz );
47311 p->sz = szDb;
47333 int sz = pLower->szOsFile;
47338 if( NEVER(sz<sizeof(MemFile)) ) sz = sizeof(MemFile);
47339 memdb_vfs.szOsFile = sz;
47682 SQLITE_PRIVATE int sqlite3BitvecBuiltinTest(int sz, int *aOp){
47691 pBitvec = sqlite3BitvecCreate( sz );
47692 pV = sqlite3MallocZero( (sz+7)/8 + 1 );
47722 i = (i & 0x7fffffff)%sz;
47739 rc = sqlite3BitvecTest(0,0) + sqlite3BitvecTest(pBitvec, sz+1)
47741 + (sqlite3BitvecSize(pBitvec) - sz);
47742 for(i=1; i<=sz; i++){
48906 SQLITE_PRIVATE void sqlite3PCacheBufferSetup(void *pBuf, int sz, int n){
48909 if( pBuf==0 ) sz = n = 0;
48910 if( n==0 ) sz = 0;
48911 sz = ROUNDDOWN8(sz);
48912 pcache1.szSlot = sz;
48922 pBuf = (void*)&((char*)pBuf)[sz];
48998 int sz = sqlite3MallocSize(p);
49001 sqlite3StatusUp(SQLITE_STATUS_PAGECACHE_OVERFLOW, sz);
49133 SQLITE_PRIVATE void *sqlite3PageMalloc(int sz){
49134 assert( sz<=65536+8 ); /* These allocations are never very large */
49135 return pcache1Alloc(sz);
49409 int sz; /* Bytes of memory required to allocate the new cache */
49414 sz = sizeof(PCache1) + sizeof(PGroup)*pcache1.separateCache;
49415 pCache = (PCache1 *)sqlite3MallocZero(sz);
52017 i64 sz;
52018 rc = sqlite3OsFileSize(pPager->jfd, &sz);
52019 if( rc==SQLITE_OK && sz>iLimit ){
54125 sqlite3_int64 sz;
54126 sz = pPager->szMmap;
54127 pPager->bUseFetch = (sz>0);
54129 sqlite3OsFileControlHint(pPager->fd, SQLITE_FCNTL_MMAP_SIZE, &sz);
60281 i64 sz;
60284 rx = sqlite3OsFileSize(pWal->pWalFd, &sz);
60285 if( rx==SQLITE_OK && (sz > nMax ) ){
61271 int sz;
61273 sz = pWal->hdr.szPage;
61274 sz = (sz&0xfe00) + ((sz&0x0001)<<16);
61275 testcase( sz<=32768 );
61276 testcase( sz>=65536 );
61277 iOffset = walFrameOffset(iRead, sz) + WAL_FRAME_HDRSIZE;
61279 return sqlite3OsRead(pWal->pWalFd, pOut, (nOut>sz ? sz : nOut), iOffset);
61808 i64 sz = pWal->mxWalSize;
61810 sz = walFrameOffset(iFrame+nExtra+1, szPage);
61812 walLimitSize(pWal, sz);
64635 int sz = get2byte(&data[iFree+2]);
64641 if( iFree+sz>iFree2 ) return SQLITE_CORRUPT_PAGE(pPage);
64644 memmove(&data[iFree+sz+sz2], &data[iFree+sz], iFree2-(iFree+sz));
64645 sz += sz2;
64646 }else if( iFree+sz>usableSize ){
64650 cbrk = top+sz;
64655 if( pc<iFree ){ put2byte(pAddr, pc+sz); }
65131 int sz; /* Size of a cell */
65150 sz = pPage->xCellSize(pPage, &data[pc]);
65151 testcase( pc+sz==usableSize );
65152 if( pc+sz>usableSize ){
69768 static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){
69777 assert( CORRUPT_DB || sz==cellSize(pPage, idx) );
69786 testcase( pc+sz==pPage->pBt->usableSize );
69787 if( pc+sz > pPage->pBt->usableSize ){
69791 rc = freeSpace(pPage, pc, sz);
69828 int sz, /* Bytes of content in pCell */
69850 assert( sz==pPage->xCellSize(pPage, pCell) || (sz==8 && iChild>0) );
69852 if( pPage->nOverflow || sz+2>pPage->nFree ){
69854 memcpy(pTemp, pCell, sz);
69884 rc = allocateSpace(pPage, sz, &idx);
69890 assert( idx+sz <= (int)pPage->pBt->usableSize );
69891 pPage->nFree -= (u16)(2 + sz);
69898 memcpy(&data[idx+4], pCell+4, sz-4);
69901 memcpy(&data[idx], pCell, sz);
70091 u16 sz = pCArray->szCell[i];
70092 assert( sz>0 );
70094 if( ((uptr)(pCell+sz))>(uptr)pEnd ) return SQLITE_CORRUPT_BKPT;
70096 }else if( (uptr)(pCell+sz)>(uptr)pSrcEnd
70102 pData -= sz;
70106 memcpy(pData, pCell, sz);
70107 assert( sz==pPg->xCellSize(pPg, pCell) || CORRUPT_DB );
70108 testcase( sz!=pPg->xCellSize(pPg,pCell) );
70172 int sz, rc;
70174 sz = cachedCellSize(pCArray, i);
70175 if( (aData[1]==0 && aData[2]==0) || (pSlot = pageFindSlot(pPg,sz,&rc))==0 ){
70176 if( (pData - pBegin)<sz ) return 1;
70177 pData -= sz;
70183 assert( (pSlot+sz)<=pCArray->apCell[i]
70184 || pSlot>=(pCArray->apCell[i]+sz)
70186 if( (uptr)(pCArray->apCell[i]+sz)>(uptr)pEnd
70193 memmove(pSlot, pCArray->apCell[i], sz);
70234 int sz;
70238 sz = pCArray->szCell[i]; assert( sz>0 );
70239 if( pFree!=(pCell + sz) ){
70245 szFree = sz;
70246 if( pFree+sz>pEnd ) return 0;
70249 szFree += sz;
70878 u16 sz = (u16)szNew[i];
70881 b.szCell[b.nCell] = sz;
70883 iSpace1 += sz;
70884 assert( sz<=pBt->maxLocal+23 );
70886 memcpy(pTemp, apDiv[i], sz);
70949 int sz;
70957 sz = 2 + cachedCellSize(&b, cntNew[i]-1);
70958 szNew[i] -= sz;
70961 sz = 2 + cachedCellSize(&b, cntNew[i]);
70963 sz = 0;
70966 szNew[i+1] += sz;
70970 sz = 2 + cachedCellSize(&b, cntNew[i]);
70971 if( szNew[i]+sz>usableSpace ) break;
70972 szNew[i] += sz;
70976 sz = 2 + cachedCellSize(&b, cntNew[i]);
70978 sz = 0;
70981 szNew[i+1] -= sz;
71208 int sz;
71215 sz = b.szCell[j] + leafCorrection;
71229 sz = 4 + putVarint(&pCell[4], info.nKey);
71246 sz = pParent->xCellSize(pParent, pCell);
71249 iOvflSpace += sz;
71250 assert( sz<=pBt->maxLocal+23 );
71252 insertCell(pParent, nxDiv+i, pCell, sz, pTemp, pNew->pgno, &rc);
88664 i64 sz;
88674 sz = sqlite3BtreeRowCountEst(pCrsr);
88675 if( ALWAYS(sz>=0) && sqlite3LogEst((u64)sz)<pOp->p3 ) res = 1;
92657 int sz; /* Size of pSorter in bytes */
92685 sz = sizeof(VdbeSorter) + nWorker * sizeof(SortSubtask);
92687 pSorter = (VdbeSorter*)sqlite3DbMallocZero(db, sz + szKeyInfo);
92692 pSorter->pKeyInfo = pKeyInfo = (KeyInfo*)((u8*)pSorter + sz);
110614 sqlite3_int64 sz = (n==0) ? 1 : 2*n;
110615 void *pNew = sqlite3DbRealloc(db, pArray, sz*szEntry);
122032 sqlite3_int64 sz;
122037 sqlite3DecOrHexToI64(zRight, &sz);
122038 if( sz<0 ) sz = sqlite3GlobalConfig.szMmap;
122039 if( pId2->n==0 ) db->szMmap = sz;
122042 sqlite3BtreeSetMmapLimit(db->aDb[ii].pBt, sz);
122046 sz = -1;
122047 rc = sqlite3_file_control(db, zDb, SQLITE_FCNTL_MMAP_SIZE, &sz);
122049 sz = 0;
122053 returnSingleInt(v, sz);
124544 int sz;
124546 for(sz=0; sz<nBytes && (z[sz]!=0 || z[sz+1]!=0); sz += 2){}
124547 nBytes = sz;
134107 i64 sz = 0;
134108 if( id->pMethods!=0 && (sqlite3OsFileSize(id, &sz)!=SQLITE_OK || sz>0) ){
155298 static int setupLookaside(sqlite3 *db, void *pBuf, int sz, int cnt){
155315 sz = ROUNDDOWN8(sz); /* IMP: R-33038-09382 */
155316 if( sz<=(int)sizeof(LookasideSlot*) ) sz = 0;
155318 if( sz==0 || cnt==0 ){
155319 sz = 0;
155323 pStart = sqlite3Malloc( sz*(sqlite3_int64)cnt ); /* IMP: R-61949-35727 */
155325 if( pStart ) cnt = sqlite3MallocSize(pStart)/sz;
155332 db->lookaside.sz = (u16)sz;
155336 assert( sz > (int)sizeof(LookasideSlot*) );
155342 p = (LookasideSlot*)&((u8*)p)[sz];
155442 int sz = va_arg(ap, int); /* IMP: R-47871-25994 */
155444 rc = setupLookaside(db, pBuf, sz, cnt);
158437 int sz = va_arg(ap, int);
158439 rc = sqlite3BitvecBuiltinTest(sz, aProg);
189291 i64 sz; /* Size of file in bytes (temp only) */
191489 int i, sz;
191490 sz = (int)strlen(z)&0xffffff;
191491 for(i=sz-1; i>0 && z[i]!='/' && z[i]!='.'; i--){}
191492 if( z[i]=='.' && sz>i+4 ) memmove(&z[i+1], &z[sz-3], 4);
192969 i64 nDiff = nNew - pFd->sz;
192971 pFd->sz = nNew;
193190 if( szNew>p->sz ){
193670 sqlite3_int64 sz = 0;
193671 rc = rbuVfsFileSize(&pDb->base, &sz);
193672 *pResOut = (sz>0);
210080 int sz = fts5SegmentSize(&pLvl->aSeg[is]);
210081 if( sz>szPromote ) return;
210134 int sz = pTst->aSeg[i].pgnoLast - pTst->aSeg[i].pgnoFirst + 1;
210135 if( sz>szMax ) szMax = sz;