Lines Matching refs:nNew

25515   int nOld, nNew, nDiff;
25534 nNew = sqlite3GlobalConfig.m.xRoundup((int)nBytes);
25535 if( nOld==nNew ){
25540 nDiff = nNew - nOld;
25545 pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);
25548 pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);
25551 nNew = sqlite3MallocSize(pNew);
25552 sqlite3StatusUp(SQLITE_STATUS_MEMORY_USED, nNew-nOld);
25556 pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);
35604 i64 nNew /* Required mapping size */
35614 assert( nNew>pFd->mmapSize );
35615 assert( nNew<=pFd->mmapSizeMax );
35616 assert( nNew>0 );
35639 pNew = osMremap(pOrig, nReuse, nNew, MREMAP_MAYMOVE);
35642 pNew = osMmap(pReq, nNew-nReuse, flags, MAP_SHARED, h, nReuse);
35645 osMunmap(pNew, nNew - nReuse);
35661 pNew = osMmap(0, nNew, flags, MAP_SHARED, h, 0);
35666 nNew = 0;
35675 pFd->mmapSize = pFd->mmapSizeActual = nNew;
46576 unsigned int nNew;
46581 nNew = p->nHash*2;
46582 if( nNew<256 ){
46583 nNew = 256;
46588 apNew = (PgHdr1 **)sqlite3MallocZero(sizeof(PgHdr1 *)*nNew);
46596 unsigned int h = pPage->iKey % nNew;
46604 p->nHash = nNew;
54486 Pgno nNew = pPager->dbSize - (pPager->dbSize==PAGER_MJ_PGNO(pPager));
54488 rc = pager_truncate(pPager, nNew);
54832 int nNew; /* Number of remaining savepoints after this op. */
54838 nNew = iSavepoint + (( op==SAVEPOINT_RELEASE ) ? 0 : 1);
54839 for(ii=nNew; ii<pPager->nSavepoint; ii++){
54842 pPager->nSavepoint = nNew;
54847 if( nNew==0 && isOpen(pPager->sjfd) ){
54862 PagerSavepoint *pSavepoint = (nNew==0)?0:&pPager->aSavepoint[nNew-1];
67249 int nNew, /* Final number of cells on page */
67254 u8 *pBegin = &pPg->aCellIdx[nNew * 2];
67260 int iNewEnd = iNew + nNew;
67282 int nAdd = MIN(nNew,iOld-iNew);
67283 assert( (iOld-iNew)<nNew || nCell==0 || CORRUPT_DB );
67296 if( iCell>=0 && iCell<nNew ){
67311 iNew+nCell, nNew-nCell, pCArray
67314 pPg->nCell = nNew;
67321 for(i=0; i<nNew && !CORRUPT_DB; i++){
67335 populateCellCache(pCArray, iNew, nNew);
67336 return rebuildPage(pPg, nNew, &pCArray->apCell[iNew], &pCArray->szCell[iNew]);
67613 int nNew = 0; /* Number of pages in apNew[] */
68009 nNew++;
68017 nNew++;
68042 for(i=0; i<nNew; i++){
68059 for(i=0; i<nNew; i++){
68061 for(j=1; j<nNew; j++){
68078 nNew>=2 ? apNew[1]->pgno : 0, nNew>=2 ? szNew[1] : 0,
68079 nNew>=2 ? cntNew[1] - cntNew[0] - !leafData : 0,
68080 nNew>=3 ? apNew[2]->pgno : 0, nNew>=3 ? szNew[2] : 0,
68081 nNew>=3 ? cntNew[2] - cntNew[1] - !leafData : 0,
68082 nNew>=4 ? apNew[3]->pgno : 0, nNew>=4 ? szNew[3] : 0,
68083 nNew>=4 ? cntNew[3] - cntNew[2] - !leafData : 0,
68084 nNew>=5 ? apNew[4]->pgno : 0, nNew>=5 ? szNew[4] : 0,
68085 nNew>=5 ? cntNew[4] - cntNew[3] - !leafData : 0
68089 put4byte(pRight, apNew[nNew-1]->pgno);
68094 if( (pageFlags & PTF_LEAF)==0 && nOld!=nNew ){
68095 MemPage *pOld = (nNew>nOld ? apNew : apOld)[nOld-1];
68096 memcpy(&apNew[nNew-1]->aData[8], &pOld->aData[8], 4);
68126 MemPage *pOld = (++iOld)<nNew ? apNew[iOld] : apOld[iOld];
68141 if( iOld>=nNew
68157 for(i=0; i<nNew-1; i++){
68231 for(i=1-nNew; i<nNew; i++){
68233 assert( iPg>=0 && iPg<nNew );
68269 assert( memcmp(abDone, "\01\01\01\01\01", nNew)==0 );
68272 assert( nNew>0 );
68290 assert( nNew==1 || CORRUPT_DB );
68303 for(i=0; i<nNew; i++){
68311 nOld, nNew, b.nCell));
68315 for(i=nNew; i<nOld; i++){
68325 ptrmapCheckPages(apNew, nNew);
68338 for(i=0; i<nNew; i++){
73076 int nNew = (p->nOpAlloc>=512 ? p->nOpAlloc*2 : p->nOpAlloc+nOp);
73078 int nNew = (p->nOpAlloc ? p->nOpAlloc*2 : (int)(1024/sizeof(Op)));
73083 if( nNew > p->db->aLimit[SQLITE_LIMIT_VDBE_OP] ){
73089 assert( nNew>=(p->nOpAlloc+nOp) );
73090 pNew = sqlite3DbRealloc(p->db, v->aOp, nNew*sizeof(Op));
88341 int nNew = MAX(128, p->nAlloc*2);
88342 while( nByte>nNew ) nNew = nNew*2;
88343 aNew = sqlite3Realloc(p->aAlloc, nNew);
88345 p->nAlloc = nNew;
89633 int nNew = pSorter->nMemory * 2;
89634 while( nNew < nMin ) nNew = nNew*2;
89635 if( nNew > pSorter->mxPmaSize ) nNew = pSorter->mxPmaSize;
89636 if( nNew < nMin ) nNew = nMin;
89638 aNew = sqlite3Realloc(pSorter->list.aMemory, nNew);
89642 pSorter->nMemory = nNew;
134157 static LogEst whereRangeAdjust(WhereTerm *pTerm, LogEst nNew){
134158 LogEst nRet = nNew;
134341 LogEst nNew;
134440 nNew = sqlite3LogEst(iUpper - iLower);
134445 if( iLwrIdx==iUprIdx ) nNew -= 20; assert( 20==sqlite3LogEst(4) );
134447 nNew = 10; assert( 10==sqlite3LogEst(2) );
134449 if( nNew<nOut ){
134450 nOut = nNew;
134467 nNew = whereRangeAdjust(pLower, nOut);
134468 nNew = whereRangeAdjust(pUpper, nNew);
134477 nNew -= 20;
134481 if( nNew<10 ) nNew = 10;
134482 if( nNew<nOut ) nOut = nNew;
151516 int nNew;
151520 pTS->aaOutput[i], pTS->anOutput[i], aOut, nOut, &aNew, &nNew
151531 nOut = nNew;
151598 int nNew;
151601 pTS->aaOutput[iOut], pTS->anOutput[iOut], &aNew, &nNew
151613 nMerge = nNew;
153866 int nNew;
153878 nNew = (int)(pOut - pPhrase->doclist.pList) - 1;
153879 assert( pPhrase->doclist.pList[nNew]=='\0' );
153880 assert( nNew<=pPhrase->doclist.nList && nNew>0 );
153881 memset(&pPhrase->doclist.pList[nNew], 0, pPhrase->doclist.nList - nNew);
153882 pPhrase->doclist.nList = nNew;
155567 static void *fts3ReallocOrFree(void *pOrig, int nNew){
155568 void *pRet = sqlite3_realloc(pOrig, nNew);
157872 int nNew = sizeof(char *)*(iArg+1);
157873 char const **aNew = (const char **)sqlite3_realloc((void *)aArg, nNew);
159546 int nNew = p->nSpace * 2;
159547 p = sqlite3_realloc(p, sizeof(*p) + nNew);
159553 p->nSpace = nNew;
160276 i64 nNew = ((i64)nPrefix+nSuffix)*2;
160277 char *zNew = sqlite3_realloc64(pReader->zTerm, nNew);
160282 pReader->nTermAlloc = nNew;
166447 int nNew; /* Number of valid entries in array aNew[] */
166451 nNew = p->nException;
166460 for(i=0; i<nNew && aNew[i]<(int)iCode; i++);
166461 for(j=nNew; j>i; j--) aNew[j] = aNew[j-1];
166463 nNew++;
166467 p->nException = nNew;
168398 int nNew = pCur->nPointAlloc*2 + 8;
168399 pNew = sqlite3_realloc(pCur->aPoint, nNew*sizeof(pCur->aPoint[0]));
168402 pCur->nPointAlloc = nNew;
175404 int nNew = (pRbu->nFrameAlloc ? pRbu->nFrameAlloc : 64) * 2;
175406 aNew = (RbuFrame*)sqlite3_realloc64(pRbu->aFrame, nNew * sizeof(RbuFrame));
175409 pRbu->nFrameAlloc = nNew;
176731 static int rbuUpdateTempSize(rbu_file *pFd, sqlite3_int64 nNew){
176733 i64 nDiff = nNew - pFd->sz;
176735 pFd->sz = nNew;
179499 int nNew;
179503 aNew = sessionMergeValue(&aNew1, &aNew2, &nNew);
179504 if( pTab->abPK[i] || nOld!=nNew || memcmp(aOld, aNew, nNew) ){
179524 int nNew;
179528 aNew = sessionMergeValue(&aNew1, &aNew2, &nNew);
179530 && (pTab->abPK[i] || (nOld==nNew && 0==memcmp(aOld, aNew, nNew)))
179534 memcpy(aOut, aNew, nNew);
179535 aOut += nNew;
179633 int nNew = (pTab->nChange ? pTab->nChange : 128) * 2;
179635 apNew = (SessionChange **)sqlite3_malloc(sizeof(SessionChange *) * nNew);
179642 memset(apNew, 0, sizeof(SessionChange *) * nNew);
179649 int iHash = sessionChangeHash(pTab, bPkOnly, p->aRecord, nNew);
179657 pTab->nChange = nNew;
180563 int nNew = p->nAlloc ? p->nAlloc : 128;
180565 nNew = nNew*2;
180566 }while( nNew<(p->nBuf+nByte) );
180568 aNew = (u8 *)sqlite3_realloc(p->aBuf, nNew);
180573 p->nAlloc = nNew;
181385 int nNew = SESSIONS_STRM_CHUNK_SIZE;
181388 if( SQLITE_OK==sessionBufferGrow(&pIn->buf, nNew, &rc) ){
181389 rc = pIn->xInput(pIn->pIn, &pIn->buf.aBuf[pIn->buf.nBuf], &nNew);
181390 if( nNew==0 ){
181393 pIn->buf.nBuf += nNew;
183296 int nNew = (int)strlen(zNew);
183301 if( 0==sqlite3_strnicmp(pTab->zName, zNew, nNew+1) ) break;
183306 pTab = sqlite3_malloc(sizeof(SessionTable) + nCol + nNew+1);
183316 memcpy(pTab->zName, zNew, nNew+1);
184271 u32 nNew;
184275 nNew = pParse->nAlloc*2 + 10;
184276 pNew = sqlite3_realloc(pParse->aNode, sizeof(JsonNode)*nNew);
184281 pParse->nAlloc = nNew;
189074 int nNew = p->nFirstAlloc ? p->nFirstAlloc*2 : 64;
189077 aNew = (int*)sqlite3_realloc(p->aFirst, nNew*sizeof(int));
189080 p->nFirstAlloc = nNew;
189541 u32 nNew = pBuf->nSpace ? pBuf->nSpace : 64;
189543 while( nNew<nByte ){
189544 nNew = nNew * 2;
189546 pNew = sqlite3_realloc(pBuf->p, nNew);
189551 pBuf->nSpace = nNew;
192369 int nNew = pNear->nPhrase + SZALLOC;
192370 int nByte = sizeof(Fts5ExprNearset) + nNew * sizeof(Fts5ExprPhrase*);
192451 int nNew = SZALLOC + (pPhrase ? pPhrase->nTerm : 0);
192454 sizeof(Fts5ExprPhrase) + sizeof(Fts5ExprTerm) * nNew
192461 pNew->nTerm = nNew - SZALLOC;
193884 int nNew = pHash->nSlot*2;
193889 apNew = (Fts5HashEntry**)sqlite3_malloc(nNew*sizeof(Fts5HashEntry*));
193891 memset(apNew, 0, nNew*sizeof(Fts5HashEntry*));
193898 iHash = fts5HashKey(nNew, (u8*)fts5EntryKey(p),
193906 pHash->nSlot = nNew;
194033 int nNew = p->nAlloc * 2;
194036 pNew = (Fts5HashEntry*)sqlite3_realloc(p, nNew);
194038 pNew->nAlloc = nNew;
195905 int nNew; /* Bytes of new data */
195907 iOff += fts5GetVarint32(&a[iOff], nNew);
195908 if( iOff+nNew>pIter->pLeaf->nn ){
195913 fts5BufferAppendBlob(&p->rc, &pIter->term, nNew, &a[iOff]);
195914 iOff += nNew;
196033 int nNew = pIter->nRowidOffset + 8;
196034 int *aNew = (int*)sqlite3_realloc(pIter->aRowidOffset, nNew*sizeof(int));
196040 pIter->nRowidOffset = nNew;
196490 int nNew = 0;
196508 fts5FastGetVarint32(a, iOff, nNew);
196517 nCmp = MIN(nNew, nTerm-nMatch);
196524 if( i==nNew ){
196529 }else if( i<nNew && a[iOff+i]>pTerm[nMatch] ){
196571 iOff += fts5GetVarint32(&a[iOff], nNew);
196580 pIter->iLeafOffset = iOff + nNew;
196585 fts5BufferAppendBlob(&p->rc, &pIter->term, nNew, &a[iOff]);
204893 int nNew = p->nException;
204908 for(i=0; i<nNew; i++){
204911 memmove(&aNew[i+1], &aNew[i], (nNew-i)*sizeof(int));
204913 nNew++;
204918 p->nException = nNew;