Lines Matching refs:nNew
5067 ** encrypted, this routine will encrypt it. If pNew==0 or nNew==0, the
21840 int nOld, nNew, nDiff;
21859 nNew = sqlite3GlobalConfig.m.xRoundup((int)nBytes);
21860 if( nOld==nNew ){
21865 nDiff = nNew - nOld;
21870 pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);
21873 pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);
21876 nNew = sqlite3MallocSize(pNew);
21877 sqlite3StatusUp(SQLITE_STATUS_MEMORY_USED, nNew-nOld);
21881 pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);
31365 ** descriptor pFd to nNew bytes. Any existing mapping is discarded.
31380 i64 nNew /* Required mapping size */
31390 assert( nNew>pFd->mmapSize );
31391 assert( nNew<=pFd->mmapSizeMax );
31392 assert( nNew>0 );
31413 pNew = osMremap(pOrig, nReuse, nNew, MREMAP_MAYMOVE);
31416 pNew = osMmap(pReq, nNew-nReuse, flags, MAP_SHARED, h, nReuse);
31419 osMunmap(pNew, nNew - nReuse);
31435 pNew = osMmap(0, nNew, flags, MAP_SHARED, h, 0);
31440 nNew = 0;
31449 pFd->mmapSize = pFd->mmapSizeActual = nNew;
41637 unsigned int nNew;
41642 nNew = p->nHash*2;
41643 if( nNew<256 ){
41644 nNew = 256;
41649 apNew = (PgHdr1 **)sqlite3MallocZero(sizeof(PgHdr1 *)*nNew);
41657 unsigned int h = pPage->iKey % nNew;
41665 p->nHash = nNew;
49261 Pgno nNew = pPager->dbSize - (pPager->dbSize==PAGER_MJ_PGNO(pPager));
49263 rc = pager_truncate(pPager, nNew);
49602 int nNew; /* Number of remaining savepoints after this op. */
49605 ** operation. Store this value in nNew. Then free resources associated
49608 nNew = iSavepoint + (( op==SAVEPOINT_RELEASE ) ? 0 : 1);
49609 for(ii=nNew; ii<pPager->nSavepoint; ii++){
49612 pPager->nSavepoint = nNew;
49617 if( nNew==0 && isOpen(pPager->sjfd) ){
49632 PagerSavepoint *pSavepoint = (nNew==0)?0:&pPager->aSavepoint[nNew-1];
61076 ** with apCell[iOld]. After balancing, this page should hold nNew cells
61089 int nNew, /* Final number of cells on page */
61094 u8 *pBegin = &pPg->aCellIdx[nNew * 2];
61100 int iNewEnd = iNew + nNew;
61122 int nAdd = MIN(nNew,iOld-iNew);
61123 assert( (iOld-iNew)<nNew || nCell==0 || CORRUPT_DB );
61136 if( iCell>=0 && iCell<nNew ){
61151 iNew+nCell, nNew-nCell, pCArray
61154 pPg->nCell = nNew;
61161 for(i=0; i<nNew && !CORRUPT_DB; i++){
61175 populateCellCache(pCArray, iNew, nNew);
61176 return rebuildPage(pPg, nNew, &pCArray->apCell[iNew], &pCArray->szCell[iNew]);
61454 int nNew = 0; /* Number of pages in apNew[] */
61854 nNew++;
61862 nNew++;
61887 for(i=0; i<nNew; i++){
61904 for(i=0; i<nNew; i++){
61906 for(j=1; j<nNew; j++){
61923 nNew>=2 ? apNew[1]->pgno : 0, nNew>=2 ? szNew[1] : 0,
61924 nNew>=2 ? cntNew[1] - cntNew[0] - !leafData : 0,
61925 nNew>=3 ? apNew[2]->pgno : 0, nNew>=3 ? szNew[2] : 0,
61926 nNew>=3 ? cntNew[2] - cntNew[1] - !leafData : 0,
61927 nNew>=4 ? apNew[3]->pgno : 0, nNew>=4 ? szNew[3] : 0,
61928 nNew>=4 ? cntNew[3] - cntNew[2] - !leafData : 0,
61929 nNew>=5 ? apNew[4]->pgno : 0, nNew>=5 ? szNew[4] : 0,
61930 nNew>=5 ? cntNew[4] - cntNew[3] - !leafData : 0
61934 put4byte(pRight, apNew[nNew-1]->pgno);
61939 if( (pageFlags & PTF_LEAF)==0 && nOld!=nNew ){
61940 MemPage *pOld = (nNew>nOld ? apNew : apOld)[nOld-1];
61941 memcpy(&apNew[nNew-1]->aData[8], &pOld->aData[8], 4);
61971 MemPage *pOld = (++iOld)<nNew ? apNew[iOld] : apOld[iOld];
61986 if( iOld>=nNew
62003 for(i=0; i<nNew-1; i++){
62069 ** The iPg value in the following loop starts at nNew-1 goes down
62070 ** to 0, then back up to nNew-1 again, thus making two passes over
62077 for(i=1-nNew; i<nNew; i++){
62079 assert( iPg>=0 && iPg<nNew );
62115 assert( memcmp(abDone, "\01\01\01\01\01", nNew)==0 );
62118 assert( nNew>0 );
62136 assert( nNew==1 || CORRUPT_DB );
62149 for(i=0; i<nNew; i++){
62157 nOld, nNew, b.nCell));
62161 for(i=nNew; i<nOld; i++){
62171 ptrmapCheckPages(apNew, nNew);
62184 for(i=0; i<nNew; i++){
66799 int nNew = (p->nOpAlloc>=512 ? p->nOpAlloc*2 : p->nOpAlloc+nOp);
66801 int nNew = (p->nOpAlloc ? p->nOpAlloc*2 : (int)(1024/sizeof(Op)));
66806 assert( nNew>=(p->nOpAlloc+nOp) );
66807 pNew = sqlite3DbRealloc(p->db, v->aOp, nNew*sizeof(Op));
80618 int nNew = MAX(128, p->nAlloc*2);
80619 while( nByte>nNew ) nNew = nNew*2;
80620 aNew = sqlite3Realloc(p->aAlloc, nNew);
80622 p->nAlloc = nNew;
81898 int nNew = pSorter->nMemory * 2;
81899 while( nNew < nMin ) nNew = nNew*2;
81900 if( nNew > pSorter->mxPmaSize ) nNew = pSorter->mxPmaSize;
81901 if( nNew < nMin ) nNew = nMin;
81903 aNew = sqlite3Realloc(pSorter->list.aMemory, nNew);
81909 pSorter->nMemory = nNew;
122536 ** that the scan will visit nNew rows. This function returns the number
122544 static LogEst whereRangeAdjust(WhereTerm *pTerm, LogEst nNew){
122545 LogEst nRet = nNew;
122728 LogEst nNew;
122823 nNew = sqlite3LogEst(iUpper - iLower);
122828 if( iLwrIdx==iUprIdx ) nNew -= 20; assert( 20==sqlite3LogEst(4) );
122830 nNew = 10; assert( 10==sqlite3LogEst(2) );
122832 if( nNew<nOut ){
122833 nOut = nNew;
122850 nNew = whereRangeAdjust(pLower, nOut);
122851 nNew = whereRangeAdjust(pUpper, nNew);
122860 nNew -= 20;
122864 if( nNew<10 ) nNew = 10;
122865 if( nNew<nOut ) nOut = nNew;
138534 int nNew;
138538 pTS->aaOutput[i], pTS->anOutput[i], aOut, nOut, &aNew, &nNew
138549 nOut = nNew;
138616 int nNew;
138619 pTS->aaOutput[iOut], pTS->anOutput[iOut], &aNew, &nNew
138631 nMerge = nNew;
140884 int nNew;
140896 nNew = (int)(pOut - pPhrase->doclist.pList) - 1;
140897 assert( pPhrase->doclist.pList[nNew]=='\0' );
140898 assert( nNew<=pPhrase->doclist.nList && nNew>0 );
140899 memset(&pPhrase->doclist.pList[nNew], 0, pPhrase->doclist.nList - nNew);
140900 pPhrase->doclist.nList = nNew;
142588 static void *fts3ReallocOrFree(void *pOrig, int nNew){
142589 void *pRet = sqlite3_realloc(pOrig, nNew);
144878 int nNew = sizeof(char *)*(iArg+1);
144879 char const **aNew = (const char **)sqlite3_realloc((void *)aArg, nNew);
146543 int nNew = p->nSpace * 2;
146544 p = sqlite3_realloc(p, sizeof(*p) + nNew);
146550 p->nSpace = nNew;
147269 int nNew = (nPrefix+nSuffix)*2;
147270 char *zNew = sqlite3_realloc(pReader->zTerm, nNew);
147275 pReader->nTermAlloc = nNew;
153431 int nNew; /* Number of valid entries in array aNew[] */
153435 nNew = p->nException;
153444 for(i=0; i<nNew && aNew[i]<iCode; i++);
153445 for(j=nNew; j>i; j--) aNew[j] = aNew[j-1];
153447 nNew++;
153451 p->nException = nNew;
155213 int nNew = pCur->nPointAlloc*2 + 8;
155214 pNew = sqlite3_realloc(pCur->aPoint, nNew*sizeof(pCur->aPoint[0]));
155217 pCur->nPointAlloc = nNew;
161119 int nNew = (pRbu->nFrameAlloc ? pRbu->nFrameAlloc : 64) * 2;
161121 aNew = (RbuFrame*)sqlite3_realloc(pRbu->aFrame, nNew * sizeof(RbuFrame));
161124 pRbu->nFrameAlloc = nNew;
164191 u32 nNew;
164195 nNew = pParse->nAlloc*2 + 10;
164196 pNew = sqlite3_realloc(pParse->aNode, sizeof(JsonNode)*nNew);
164201 pParse->nAlloc = nNew;
168614 int nNew = pBuf->nSpace ? pBuf->nSpace*2 : 64;
168619 while( nNew<(pBuf->n + nByte) ){
168620 nNew = nNew * 2;
168622 pNew = sqlite3_realloc(pBuf->p, nNew);
168627 pBuf->nSpace = nNew;
171145 int nNew = pNear->nPhrase + SZALLOC;
171146 int nByte = sizeof(Fts5ExprNearset) + nNew * sizeof(Fts5ExprPhrase*);
171210 int nNew = SZALLOC + (pPhrase ? pPhrase->nTerm : 0);
171213 sizeof(Fts5ExprPhrase) + sizeof(Fts5ExprTerm) * nNew
171220 pNew->nTerm = nNew - SZALLOC;
172160 int nNew = pHash->nSlot*2;
172165 apNew = (Fts5HashEntry**)sqlite3_malloc(nNew*sizeof(Fts5HashEntry*));
172167 memset(apNew, 0, nNew*sizeof(Fts5HashEntry*));
172174 iHash = fts5HashKey(nNew, (u8*)p->zKey, strlen(p->zKey));
172181 pHash->nSlot = nNew;
172270 int nNew = p->nAlloc * 2;
172273 pNew = (Fts5HashEntry*)sqlite3_realloc(p, nNew);
172275 pNew->nAlloc = nNew;
172586 ** varint: number of bytes of new term data (nNew)
172587 ** blob: nNew bytes of new term data
174001 int nNew; /* Bytes of new data */
174003 iOff += fts5GetVarint32(&a[iOff], nNew);
174005 fts5BufferAppendBlob(&p->rc, &pIter->term, nNew, &a[iOff]);
174006 iOff += nNew;
174100 int nNew = pIter->nRowidOffset + 8;
174101 int *aNew = (int*)sqlite3_realloc(pIter->aRowidOffset, nNew*sizeof(int));
174107 pIter->nRowidOffset = nNew;
174449 int nNew = 0;
174463 fts5FastGetVarint32(a, iOff, nNew);
174472 nCmp = MIN(nNew, nTerm-nMatch);
174479 if( i==nNew ){
174484 }else if( i<nNew && a[iOff+i]>pTerm[nMatch] ){
174518 iOff += fts5GetVarint32(&a[iOff], nNew);
174527 pIter->iLeafOffset = iOff + nNew;
174532 fts5BufferAppendBlob(&p->rc, &pIter->term, nNew, &a[iOff]);
175362 ** Return the size of the prefix, in bytes, that buffer (nNew/pNew) shares
175367 int nNew, const u8 *pNew
175370 assert( fts5BlobCompare(pOld, nOld, pNew, nNew)<0 );
182070 int nNew = p->nException;
182085 for(i=0; i<nNew; i++){
182088 memmove(&aNew[i+1], &aNew[i], (nNew-i)*sizeof(int));
182090 nNew++;
182095 p->nException = nNew;