Lines Matching refs:nByte

1746   void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg);
1749 int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut);
4453 int nByte, /* Maximum length of zSql in bytes. */
4460 int nByte, /* Maximum length of zSql in bytes. */
4467 int nByte, /* Maximum length of zSql in bytes. */
4475 int nByte, /* Maximum length of zSql in bytes. */
4482 int nByte, /* Maximum length of zSql in bytes. */
4489 int nByte, /* Maximum length of zSql in bytes. */
19720 SQLITE_PRIVATE int sqlite3Utf8CharLen(const char *pData, int nByte);
22567 int nByte = sqlite3PagerMemUsed(pPager);
22569 nByte = nByte / sqlite3BtreeConnectionCount(pBt);
22571 totalUsed += nByte;
22587 int nByte = 0; /* Used to accumulate return value */
22590 db->pnBytesFreed = &nByte;
22596 nByte += sqlite3GlobalConfig.m.xRoundup(sizeof(HashElem)) * (
22602 nByte += sqlite3_msize(pSchema->tblHash.ht);
22603 nByte += sqlite3_msize(pSchema->trigHash.ht);
22604 nByte += sqlite3_msize(pSchema->idxHash.ht);
22605 nByte += sqlite3_msize(pSchema->fkeyHash.ht);
22619 *pCurrent = nByte;
22630 int nByte = 0; /* Used to accumulate return value */
22632 db->pnBytesFreed = &nByte;
22640 *pCurrent = nByte;
24175 SQLITE_PRIVATE void sqlite3OsDlError(sqlite3_vfs *pVfs, int nByte, char *zBufOut){
24176 pVfs->xDlError(pVfs, nByte, zBufOut);
24185 SQLITE_PRIVATE int sqlite3OsRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){
24187 memset(zBufOut, 0, nByte);
24188 if( ALWAYS(nByte>(signed)sizeof(unsigned)) ) nByte = sizeof(unsigned int);
24189 memcpy(zBufOut, &sqlite3Config.iPrngSeed, nByte);
24192 return pVfs->xRandomness(pVfs, nByte, zBufOut);
24483 static void *sqlite3MemMalloc(int nByte){ return 0; }
24485 static void *sqlite3MemRealloc(void *pPrior, int nByte){ return 0; }
24642 static void *sqlite3MemMalloc(int nByte){
24645 testcase( ROUND8(nByte)==nByte );
24646 p = SQLITE_MALLOC( nByte );
24649 sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes of memory", nByte);
24654 assert( nByte>0 );
24655 testcase( ROUND8(nByte)!=nByte );
24656 p = SQLITE_MALLOC( nByte+8 );
24658 p[0] = nByte;
24662 sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes of memory", nByte);
24714 static void *sqlite3MemRealloc(void *pPrior, int nByte){
24716 void *p = SQLITE_REALLOC(pPrior, nByte);
24721 SQLITE_MALLOCSIZE(pPrior), nByte);
24726 assert( pPrior!=0 && nByte>0 );
24727 assert( nByte==ROUND8(nByte) ); /* EV: R-46199-30249 */
24729 p = SQLITE_REALLOC(p, nByte+8 );
24731 p[0] = nByte;
24737 sqlite3MemSize(pPrior), nByte);
25027 static void randomFill(char *pBuf, int nByte){
25030 y = nByte | 1;
25031 while( nByte >= 4 ){
25037 nByte -= 4;
25039 while( nByte-- > 0 ){
25050 static void *sqlite3MemMalloc(int nByte){
25060 nReserve = ROUND8(nByte);
25086 mem.xBacktrace(nByte, pHdr->nBacktrace-1, &aAddr[1]);
25094 pHdr->iSize = nByte;
25095 adjustStats(nByte, +1);
25098 randomFill((char*)pInt, nByte);
25099 memset(((char*)pInt)+nByte, 0x65, nReserve-nByte);
25151 static void *sqlite3MemRealloc(void *pPrior, int nByte){
25155 assert( (nByte & 7)==0 ); /* EV: R-46199-30249 */
25157 pNew = sqlite3MemMalloc(nByte);
25159 memcpy(pNew, pPrior, (int)(nByte<pOldHdr->iSize ? nByte : pOldHdr->iSize));
25160 if( nByte>pOldHdr->iSize ){
25161 randomFill(&((char*)pNew)[pOldHdr->iSize], nByte - (int)pOldHdr->iSize);
25574 static void memsys3OutOfMemory(int nByte){
25579 sqlite3_release_memory(nByte);
25693 static void *memsys3MallocUnsafe(int nByte){
25700 if( nByte<=12 ){
25703 nBlock = (nByte + 11)/8;
26249 static void *memsys5MallocUnsafe(int nByte){
26256 assert( nByte>0 );
26259 if( nByte > 0x40000000 ) return 0;
26264 if( (u32)nByte>mem5.maxRequest ){
26265 mem5.maxRequest = nByte;
26271 for(iFullSz=mem5.szAtom,iLogsize=0; iFullSz<nByte; iFullSz*=2,iLogsize++){}
26280 sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes", nByte);
26299 mem5.totalExcess += iFullSz - nByte;
26481 int nByte; /* Number of bytes of memory available to this allocator */
26496 nByte = sqlite3GlobalConfig.nHeap;
26507 mem5.nBlock = (nByte / (mem5.szAtom+sizeof(u8)));
28298 static void sqlite3MallocAlarm(int nByte){
28301 sqlite3_release_memory(nByte);
31903 SQLITE_PRIVATE int sqlite3Utf8CharLen(const char *zIn, int nByte){
31907 if( nByte>=0 ){
31908 zTerm = &z[nByte];
31957 SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *db, const void *z, int nByte, u8 enc){
31961 sqlite3VdbeMemSetStr(&m, z, nByte, enc, SQLITE_STATIC);
36312 static int unixMapfile(unixFile *pFd, i64 nByte);
38021 static int unixTruncate(sqlite3_file *id, i64 nByte){
38033 nByte = ((nByte + pFile->szChunk - 1)/pFile->szChunk) * pFile->szChunk;
38036 rc = robust_ftruncate(pFile->h, nByte);
38049 if( pFile->inNormalWrite && nByte==0 ){
38059 if( nByte<pFile->mmapSize ){
38060 pFile->mmapSize = nByte;
38109 static int fcntlSizeHint(unixFile *pFile, i64 nByte){
38118 nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk;
38155 if( pFile->mmapSizeMax>0 && nByte>pFile->mmapSize ){
38158 if( robust_ftruncate(pFile->h, nByte) ){
38164 rc = unixMapfile(pFile, nByte);
39005 int nByte = nReqRegion*szRegion; /* Minimum required file size */
39020 if( sStat.st_size<nByte ){
39040 assert( (nByte % pgsz)==0 );
39041 for(iPg=(sStat.st_size/pgsz); iPg<(nByte/pgsz); iPg++){
40754 int nByte;
40793 nByte = osReadlink(zIn, zDel, nOut-1);
40794 if( nByte<0 ){
40800 if( nByte+n+1>nOut ){
40803 memmove(&zDel[n], zDel, nByte+1);
40805 nByte += n;
40808 zDel[nByte] = '\0';
44071 int nByte;
44074 nByte = osWideCharToMultiByte(CP_UTF8, 0, zWideText, -1, 0, 0, 0, 0);
44075 if( nByte == 0 ){
44078 zText = sqlite3MallocZero( nByte );
44082 nByte = osWideCharToMultiByte(CP_UTF8, 0, zWideText, -1, zText, nByte,
44084 if( nByte == 0 ){
44098 int nByte;
44102 nByte = osMultiByteToWideChar(codepage, 0, zText, -1, NULL,
44104 if( nByte==0 ){
44107 zMbcsText = sqlite3MallocZero( nByte*sizeof(WCHAR) );
44111 nByte = osMultiByteToWideChar(codepage, 0, zText, -1, zMbcsText,
44112 nByte);
44113 if( nByte==0 ){
44127 int nByte;
44131 nByte = osWideCharToMultiByte(codepage, 0, zWideText, -1, 0, 0, 0, 0);
44132 if( nByte == 0 ){
44135 zText = sqlite3MallocZero( nByte );
44139 nByte = osWideCharToMultiByte(codepage, 0, zWideText, -1, zText,
44140 nByte, 0, 0);
44141 if( nByte == 0 ){
45270 static int winTruncate(sqlite3_file *id, sqlite3_int64 nByte){
45301 osGetCurrentProcessId(), pFile, pFile->h, nByte, pFile->locktype));
45309 nByte = ((nByte + pFile->szChunk - 1)/pFile->szChunk) * pFile->szChunk;
45322 if( winSeekFile(pFile, nByte) ){
45334 if( oldMmapSize>nByte ){
46158 int nByte /* Number of bytes to lock or unlock */
46166 pFile->hFile.h, lockType, ofst, nByte));
46170 rc = winUnlockFile(&pFile->hFile.h, ofst, 0, nByte, 0);
46175 rc = winLockFile(&pFile->hFile.h, dwFlags, ofst, 0, nByte, 0);
46601 int nByte = (iRegion+1)*szRegion; /* Minimum required file size */
46617 if( sz<nByte ){
46625 rc = winTruncate((sqlite3_file *)&pShmNode->hFile, nByte);
46654 NULL, protect, nByte, NULL
46658 NULL, protect, 0, nByte, NULL
46662 NULL, protect, 0, nByte, NULL
46666 osGetCurrentProcessId(), pShmNode->nRegion, nByte,
46772 static int winMapfile(winFile *pFd, sqlite3_int64 nByte){
46773 sqlite3_int64 nMap = nByte;
46778 osGetCurrentProcessId(), pFd, nByte));
47929 DWORD nByte;
48042 nByte = osGetFullPathNameW((LPCWSTR)zConverted, 0, 0, 0);
48043 if( nByte==0 ){
48048 nByte += 3;
48049 zTemp = sqlite3MallocZero( nByte*sizeof(zTemp[0]) );
48054 nByte = osGetFullPathNameW((LPCWSTR)zConverted, nByte, zTemp, 0);
48055 if( nByte==0 ){
48068 nByte = osGetFullPathNameA((char*)zConverted, 0, 0, 0);
48069 if( nByte==0 ){
48074 nByte += 3;
48075 zTemp = sqlite3MallocZero( nByte*sizeof(zTemp[0]) );
48080 nByte = osGetFullPathNameA((char*)zConverted, nByte, zTemp, 0);
48081 if( nByte==0 ){
48652 static void memdbDlError(sqlite3_vfs*, int nByte, char *zErrMsg);
48655 static int memdbRandomness(sqlite3_vfs*, int nByte, char *zOut);
49162 static void memdbDlError(sqlite3_vfs *pVfs, int nByte, char *zErrMsg){
49163 ORIGVFS(pVfs)->xDlError(ORIGVFS(pVfs), nByte, zErrMsg);
49184 static int memdbRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){
49185 return ORIGVFS(pVfs)->xRandomness(ORIGVFS(pVfs), nByte, zBufOut);
51041 static void *pcache1Alloc(int nByte){
51044 if( nByte<=pcache1.szSlot ){
51052 sqlite3StatusHighwater(SQLITE_STATUS_PAGECACHE_SIZE, nByte);
51061 p = sqlite3Malloc(nByte);
51066 sqlite3StatusHighwater(SQLITE_STATUS_PAGECACHE_SIZE, nByte);
53900 static u32 pager_datahash(int nByte, unsigned char *pData){
53903 for(i=0; i<nByte; i++){
56377 i64 nByte = 0;
56380 rc = sqlite3OsFileSize(pPager->fd, &nByte);
56400 pPager->dbSize = (Pgno)((nByte+pageSize-1)/pageSize);
61014 sqlite3_int64 nByte = sizeof(u32*)*(iPage+1);
61016 apNew = (volatile u32 **)sqlite3Realloc((void *)pWal->apWiData, nByte);
61105 int nByte, /* Bytes of content in a[]. Must be a multiple of 8. */
61111 u32 *aEnd = (u32 *)&a[nByte];
61120 assert( nByte>=8 );
61121 assert( (nByte&0x00000007)==0 );
61122 assert( nByte<=65536 );
61448 int nByte; /* Number of bytes to zero in aPgno[] */
61481 nByte = (int)((char *)sLoc.aHash - (char *)&sLoc.aPgno[iLimit]);
61482 assert( nByte>=0 );
61483 memset((void *)&sLoc.aPgno[iLimit], 0, nByte);
61528 int nByte = (int)((u8*)&sLoc.aHash[HASHTABLE_NSLOT] - (u8*)sLoc.aPgno);
61529 assert( nByte>=0 );
61530 memset((void*)sLoc.aPgno, 0, nByte);
62158 sqlite3_int64 nByte; /* Number of bytes to allocate */
62171 nByte = sizeof(WalIterator)
62174 p = (WalIterator *)sqlite3_malloc64(nByte);
62178 memset(p, 0, nByte);
67145 static u8 *pageFindSlot(MemPage *pPg, int nByte, int *pRc){
67151 int maxPC = pPg->pBt->usableSize - nByte; /* Max address for a usable slot */
67160 if( (x = size - nByte)>=0 ){
67193 if( pc>maxPC+nByte-4 ){
67213 static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
67223 assert( nByte>=0 ); /* Minimum cell size is 4 */
67224 assert( pPage->nFree>=nByte );
67226 assert( nByte < (int)(pPage->pBt->usableSize-8) );
67254 u8 *pSpace = pageFindSlot(pPage, nByte, &rc);
67257 assert( pSpace+nByte<=data+pPage->pBt->usableSize );
67272 testcase( gap+2+nByte==top );
67273 if( gap+2+nByte>top ){
67276 rc = defragmentPage(pPage, MIN(4, pPage->nFree - (2+nByte)));
67279 assert( gap+2+nByte<=top );
67289 top -= nByte;
67291 assert( top+nByte <= (int)pPage->pBt->usableSize );
70374 int nByte, /* Number of bytes to copy */
70384 memcpy(pPayload, pBuf, nByte);
70387 memcpy(pBuf, pPayload, nByte);
77185 i64 nByte = sqlite3BtreeGetPageSize(pFrom)*(i64)sqlite3BtreeLastPage(pFrom);
77186 rc = sqlite3OsFileControl(pFd, SQLITE_FCNTL_OVERWRITE, &nByte);
77587 int nByte;
77596 nByte = pMem->n + pMem->u.nZero;
77597 if( nByte<=0 ){
77599 nByte = 1;
77601 if( sqlite3VdbeMemGrow(pMem, nByte, 1) ){
77605 assert( sqlite3DbMallocSize(pMem->db,pMem->z) >= nByte );
77644 const int nByte = 32;
77655 if( sqlite3VdbeMemClearAndResize(pMem, nByte) ){
77660 vdbeMemRenderNum(nByte, pMem->z, pMem);
78094 int nByte = n>0?n:1;
78095 if( sqlite3VdbeMemGrow(pMem, nByte, 0) ){
78099 assert( sqlite3DbMallocSize(pMem->db, pMem->z)>=nByte );
78100 memset(pMem->z, 0, nByte);
78336 i64 nByte = n; /* New value for pMem->n */
78356 if( nByte<0 ){
78359 nByte = strlen(z);
78361 for(nByte=0; nByte<=iLimit && (z[nByte] | z[nByte+1]); nByte+=2){}
78371 i64 nAlloc = nByte;
78375 if( nByte>iLimit ){
78397 pMem->n = (int)(nByte & 0x7fffffff);
78416 if( nByte>iLimit ){
78592 int nByte; /* Bytes of space to allocate */
78596 nByte = sizeof(Mem) * nCol + ROUND8(sizeof(UnpackedRecord));
78597 pRec = (UnpackedRecord*)sqlite3DbMallocZero(db, nByte);
79540 int nByte;
79544 nByte = sizeof(*pCtx) + (nArg-1)*sizeof(sqlite3_value*);
79545 pCtx = sqlite3DbMallocRawNN(pParse->db, nByte);
79828 int nByte = (p->nSub+1)*sizeof(SubProgram*);
79834 p->apSub = sqlite3DbReallocOrFree(v->db, p->apSub, nByte);
80204 sqlite3_int64 nByte = (p->nScan+1) * sizeof(ScanStatus);
80206 aNew = (ScanStatus*)sqlite3DbRealloc(p->db, p->aScan, nByte);
81202 int nByte = (nSub+1)*sizeof(SubProgram*);
81208 p->rc = sqlite3VdbeMemGrow(pSub, nByte, nSub!=0);
81447 sqlite3_int64 nByte /* Bytes of memory needed */
81451 nByte = ROUND8(nByte);
81452 if( nByte <= p->nFree ){
81453 p->nFree -= nByte;
81456 p->nNeeded += nByte;
83182 int nByte; /* Number of bytes required for *p */
83183 nByte = ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*(pKeyInfo->nKeyField+1);
83184 p = (UnpackedRecord *)sqlite3DbMallocRaw(pKeyInfo->db, nByte);
85314 static SQLITE_NOINLINE void *createAggContext(sqlite3_context *p, int nByte){
85317 if( nByte<=0 ){
85321 sqlite3VdbeMemClearAndResize(pMem, nByte);
85325 memset(pMem->z, 0, nByte);
85336 SQLITE_API void *sqlite3_aggregate_context(sqlite3_context *p, int nByte){
85339 testcase( nByte<0 );
85341 return createAggContext(p, nByte);
86974 int nByte;
86976 nByte =
86993 if( pMem->szMalloc<nByte ){
86997 pMem->z = pMem->zMalloc = sqlite3DbMallocRaw(pMem->db, nByte);
87002 pMem->szMalloc = nByte;
88277 i64 nByte; /* Total size of the output string or blob */
88308 nByte = pIn1->n + pIn2->n;
88309 if( nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){
88312 if( sqlite3VdbeMemGrow(pOut, (int)nByte+3, pOut==pIn2) ){
88324 pOut->z[nByte]=0;
88325 pOut->z[nByte+1] = 0;
88326 pOut->z[nByte+2] = 0;
88328 pOut->n = (int)nByte;
89789 i64 nByte; /* Data space required for this record */
90001 nByte = nHdr+nData;
90008 if( nByte+nZero<=pOut->szMalloc ){
90015 if( nByte+nZero>db->aLimit[SQLITE_LIMIT_LENGTH] ){
90018 if( sqlite3VdbeMemClearAndResize(pOut, (int)nByte) ){
90022 pOut->n = (int)nByte;
90046 assert( nByte==(int)(zPayload - (u8*)pOut->z) );
93506 int nByte; /* Bytes of runtime space required for sub-program */
93554 nByte = ROUND8(sizeof(VdbeFrame))
93558 pFrame = sqlite3DbMallocZero(db, nByte);
93565 pRt->n = nByte;
95201 int nByte; /* Size of open blob, in bytes */
95268 p->nByte = sqlite3VdbeSerialTypeLen(type);
95569 if( n<0 || iOffset<0 || ((sqlite3_int64)iOffset+n)>p->nByte ){
95646 return (p && p->pStmt) ? p->nByte : 0;
96181 int nByte, /* Bytes of data to read */
96189 p->iReadOff += nByte;
96218 if( nByte<=nAvail ){
96223 p->iReadOff += nByte;
96231 if( p->nAlloc<nByte ){
96234 while( nByte>nNew ) nNew = nNew*2;
96245 nRem = nByte - nAvail;
96259 memcpy(&p->aAlloc[nByte - nRem], aNext, nCopy);
96433 u64 nByte = 0; /* Size of PMA in bytes */
96434 rc = vdbePmaReadVarint(pReadr, &nByte);
96435 pReadr->iEof = pReadr->iReadOff + nByte;
96436 *pnByte += nByte;
96871 int nByte; /* Total bytes of space to allocate */
96877 nByte = sizeof(MergeEngine) + N * (sizeof(int) + sizeof(PmaReader));
96879 pNew = sqlite3FaultSim(100) ? 0 : (MergeEngine*)sqlite3MallocZero(nByte);
96978 static void vdbeSorterExtendFile(sqlite3 *db, sqlite3_file *pFd, i64 nByte){
96979 if( nByte<=(i64)(db->nMaxSorterMmap) && pFd->pMethods->iVersion>=3 ){
96983 sqlite3OsFileControlHint(pFd, SQLITE_FCNTL_SIZE_HINT, &nByte);
96984 sqlite3OsFetch(pFd, 0, (int)nByte, &p);
97220 int nByte;
97222 nByte = sqlite3PutVarint(aByte, iVal);
97223 vdbePmaWriteBlob(p, aByte, nByte);
102993 int nByte = dupedExprStructSize(p, flags) & 0xfff;
102995 nByte += sqlite3Strlen30NN(p->u.zToken)+1;
102997 return ROUND8(nByte);
103014 int nByte = 0;
103016 nByte = dupedExprNodeSize(p, flags);
103018 nByte += dupedExprSize(p->pLeft, flags) + dupedExprSize(p->pRight, flags);
103021 return nByte;
103145 sqlite3_int64 nByte = sizeof(*p) + sizeof(p->a[0]) * (p->nCte-1);
103146 pRet = sqlite3DbMallocZero(db, nByte);
103275 int nByte;
103278 nByte = sizeof(*p) + (p->nSrc>0 ? sizeof(p->a[0]) * (p->nSrc-1) : 0);
103279 pNew = sqlite3DbMallocRawNN(db, nByte );
111955 int nByte; /* Bytes of space required */
111972 nByte = sizeof(IndexSample) * nSample;
111973 nByte += sizeof(tRowcnt) * nIdxCol * 3 * nSample;
111974 nByte += nIdxCol * sizeof(tRowcnt); /* Space for Index.aAvgEq[] */
111976 pIdx->aSample = sqlite3DbMallocZero(db, nByte);
111989 assert( ((u8*)pSpace)-nByte==(u8*)(pIdx->aSample) );
115212 int nByte;
115215 nByte = (sizeof(char*) + sizeof(LogEst) + sizeof(i16) + 1)*N;
115216 zExtra = sqlite3DbMallocZero(db, nByte);
116610 i64 nByte;
116635 nByte = sizeof(*pFKey) + (nCol-1)*sizeof(pFKey->aCol[0]) + pTo->n + 1;
116638 nByte += sqlite3Strlen30(pToCol->a[i].zEName) + 1;
116641 pFKey = sqlite3DbMallocZero(db, nByte );
116866 int nByte; /* Bytes of space for Index object + arrays */
116868 nByte = ROUND8(sizeof(Index)) + /* Index structure */
116873 p = sqlite3DbMallocZero(db, nByte + nExtra);
116882 *ppExtra = ((char*)p) + nByte;
118630 sqlite3_int64 nByte = sizeof(*pWith) + (sizeof(pWith->a[1]) * pWith->nCte);
118631 pNew = sqlite3DbRealloc(db, pWith, nByte);
120614 static void *contextMalloc(sqlite3_context *context, i64 nByte){
120617 assert( nByte>0 );
120618 testcase( nByte==db->aLimit[SQLITE_LIMIT_LENGTH] );
120619 testcase( nByte==db->aLimit[SQLITE_LIMIT_LENGTH]+1 );
120620 if( nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){
120624 z = sqlite3Malloc(nByte);
125910 u64 nByte;
125918 nByte = (sizeof(IndexListTerm)+1)*nIdx + nIdx;
125919 sIdxIter.u.ax.aIdx = sqlite3DbMallocZero(db, nByte);
128732 u64 nByte = (wsdAutoext.nExt+1)*sizeof(wsdAutoext.aExt[0]);
128734 aNew = sqlite3_realloc64(wsdAutoext.aExt, nByte);
155813 int nByte = (pWInfo->nLevel-1-i) * sizeof(WhereLevel);
155814 memmove(&pWInfo->a[i], &pWInfo->a[i+1], nByte);
169507 u64 nByte = nUri+8; /* Bytes of space to allocate */
169513 for(iIn=0; iIn<nUri; iIn++) nByte += (zUri[iIn]=='&');
169514 zFile = sqlite3_malloc64(nByte);
171014 sqlite3_int64 nByte;
171017 nByte = strlen(zDatabase) + strlen(zJournal) + strlen(zWal) + 10;
171019 nByte += strlen(azParam[i])+1;
171021 pResult = p = sqlite3_malloc64( nByte );
171034 assert( (sqlite3_int64)(p - pResult)==nByte );
172898 SQLITE_PRIVATE void *sqlite3Fts3MallocZero(i64 nByte);
173632 int nByte;
173633 nByte = sqlite3Fts3ReadInt(*pp, &nInt);
173637 if( nByte==0 ){
173641 *pp += nByte;
173819 sqlite3_int64 nByte; /* Size of allocation used for *p */
173852 nByte = sizeof(const char *) * (argc-2);
173853 aCol = (const char **)sqlite3_malloc64(nByte);
173855 memset((void*)aCol, 0, nByte);
173856 azNotindexed = (char **)sqlite3_malloc64(nByte);
173859 memset(azNotindexed, 0, nByte);
174044 nByte = sizeof(Fts3Table) + /* Fts3Table */
174051 p = (Fts3Table*)sqlite3_malloc64(nByte);
174056 memset(p, 0, nByte);
174104 assert( zCsr <= &((char *)p)[nByte] );
175581 sqlite3_int64 nByte = (pCsr->nSegment + 16)*sizeof(Fts3SegReader*);
175582 apNew = (Fts3SegReader **)sqlite3_realloc64(pCsr->apSegment, nByte);
177371 int nByte = a[p->nToken-1].nList;
177372 char *aDoclist = sqlite3_malloc(nByte+FTS3_BUFFER_PADDING);
177374 memcpy(aDoclist, a[p->nToken-1].pList, nByte+1);
177375 memset(&aDoclist[nByte], 0, FTS3_BUFFER_PADDING);
177576 sqlite3_int64 nByte = 0;
177588 a += sqlite3Fts3GetVarintBounded(a, pEnd, &nByte);
177591 if( nDoc==0 || nByte==0 ){
177597 pCsr->nRowAvg = (int)(((nByte / nDoc) + p->nPgsz) / p->nPgsz);
178813 sqlite3_int64 nByte; /* Bytes of space to allocate here */
178844 nByte = sizeof(Fts3auxTable) + sizeof(Fts3Table) + nDb + nFts3 + 2;
178845 p = (Fts3auxTable *)sqlite3_malloc64(nByte);
178847 memset(p, 0, nByte);
179428 SQLITE_PRIVATE void *sqlite3Fts3MallocZero(sqlite3_int64 nByte){
179429 void *pRet = sqlite3_malloc64(nByte);
179430 if( pRet ) memset(pRet, 0, nByte);
179504 sqlite3_int64 nByte; /* total space to allocate */
179508 nByte = sizeof(Fts3Expr) + sizeof(Fts3Phrase) + nToken;
179509 pRet = (Fts3Expr *)sqlite3Fts3MallocZero(nByte);
179619 int nByte = 0, iBegin = 0, iEnd = 0, iPos = 0;
179620 rc = pModule->xNext(pCursor, &zByte, &nByte, &iBegin, &iEnd, &iPos);
179627 zTemp = fts3ReallocOrFree(zTemp, nTemp + nByte);
179634 memcpy(&zTemp[nTemp], zByte, nByte);
179635 nTemp += nByte;
179637 pToken->n = nByte;
179931 int nByte = 0;
179933 rc = getNextNode(pParse, zIn, nIn, &p, &nByte);
179934 assert( nByte>0 || (rc!=SQLITE_OK && p==0) );
180021 assert( nByte>0 );
180023 assert( rc!=SQLITE_OK || (nByte>0 && nByte<=nIn) );
180024 nIn -= nByte;
180025 zIn += nByte;
182528 int nByte = 0;
182532 nByte += (int)(strlen(argv[i]) + 1);
182535 *pazDequote = azDequote = sqlite3_malloc64(sizeof(char *)*argc + nByte);
182759 int nByte = sqlite3_value_bytes(apVal[0]);
182760 pCsr->zInput = sqlite3_malloc64(nByte+1);
182764 if( nByte>0 ) memcpy(pCsr->zInput, zByte, nByte);
182765 pCsr->zInput[nByte] = 0;
182766 rc = pTab->pMod->xOpen(pTab->pTok, pCsr->zInput, nByte, &pCsr->pCsr);
184091 int nByte = sqlite3_blob_bytes(p->pSegments);
184092 *pnBlob = nByte;
184094 char *aByte = sqlite3_malloc(nByte + FTS3_NODE_PADDING);
184098 if( pnLoad && nByte>(FTS3_NODE_CHUNK_THRESHOLD) ){
184099 nByte = FTS3_NODE_CHUNKSIZE;
184100 *pnLoad = nByte;
184102 rc = sqlite3_blob_read(p->pSegments, aByte, nByte, 0);
184103 memset(&aByte[nByte], 0, FTS3_NODE_PADDING);
184151 static int fts3SegReaderRequire(Fts3SegReader *pReader, char *pFrom, int nByte){
184157 && (pFrom - pReader->aNode + nByte)>pReader->nPopulate
184637 sqlite3_int64 nByte;
184638 nByte = sizeof(Fts3SegReader) + (nElem+1)*sizeof(Fts3HashElem *);
184639 pReader = (Fts3SegReader *)sqlite3_malloc64(nByte);
184643 memset(pReader, 0, nByte);
185852 int nByte;
185881 nByte = sqlite3Fts3VarintLen(iDelta) + (isRequirePos?nList+1:0);
185883 rc = fts3GrowSegReaderBuffer(pCsr, nByte+nDoclist+FTS3_NODE_PADDING);
185987 sqlite3_int64 nByte /* Size of new segment at iAbsLevel */
185997 i64 nLimit = (nByte*3)/2;
186444 sqlite3_int64 nByte = sizeof(u32) * ((sqlite3_int64)p->nColumn+1)*3;
186445 aSz = (u32 *)sqlite3_malloc64(nByte);
186449 memset(aSz, 0, nByte);
186511 sqlite3_int64 nByte; /* Bytes allocated at pCsr->apSegment[] */
186515 nByte = sizeof(Fts3SegReader *) * nSeg;
186516 pCsr->apSegment = (Fts3SegReader **)sqlite3_malloc64(nByte);
186521 memset(pCsr->apSegment, 0, nByte);
188818 sqlite3_int64 nByte = sizeof(u32) * (2*(sqlite3_int64)nElem + 1)
188822 pRet = sqlite3Fts3MallocZero(nByte + nStr+1);
188828 pRet->zMatchinfo = ((char*)pRet) + nByte;
189209 sqlite3_int64 nByte; /* Number of bytes of space to allocate */
189226 nByte = sizeof(SnippetPhrase) * nList;
189227 sIter.aPhrase = (SnippetPhrase *)sqlite3Fts3MallocZero(nByte);
194775 int nByte = (NCELL(pNode) - iCell - 1) * pRtree->nBytesPerCell;
194776 memmove(pDst, pSrc, nByte);
196419 sqlite3_int64 nByte = (pRtree->nDim+1)*(sizeof(int*)+nCell*sizeof(int));
196421 aaSorted = (int **)sqlite3_malloc64(nByte);
196427 memset(aaSorted, 0, nByte);
198656 int nByte;
198659 && (nByte = sqlite3_value_bytes(pVal))>=(4+6*sizeof(GeoCoord))
198669 && (nVertex*2*sizeof(GeoCoord) + 4)==(unsigned int)nByte
198678 memcpy(p->hdr, a, nByte);
199412 sqlite3_int64 nByte;
199421 nByte = sizeof(GeoEvent)*nVertex*2
199424 p = sqlite3_malloc64( nByte );
201097 int nByte = 0;
201122 if( nByte ){
201123 char *zNew = sqlite3_realloc(pCsr->zBuffer, nByte);
201128 pCsr->nBuffer = nByte;
201132 pCsr->zBuffer, pCsr->nBuffer, &nByte, /* Output vars */
201136 } while( nByte>pCsr->nBuffer );
201139 *pnBytes = nByte;
202847 static void *rbuMalloc(sqlite3rbu *p, sqlite3_int64 nByte){
202850 assert( nByte>0 );
202851 pRet = sqlite3_malloc64(nByte);
202855 memset(pRet, 0, nByte);
202868 sqlite3_int64 nByte = (2*sizeof(char*) + sizeof(int) + 3*sizeof(u8)) * nCol;
202871 azNew = (char**)rbuMalloc(p, nByte);
203736 sqlite3_int64 nByte = 2*(sqlite3_int64)nBind + 1;
203738 zRet = (char*)rbuMalloc(p, nByte);
205782 size_t nByte = sizeof(sqlite3rbu) + nTarget+1 + nRbu+1;
205784 p = (sqlite3rbu*)sqlite3_malloc64(nByte);
206711 sqlite3_int64 nByte = (iRegion+1) * sizeof(char*);
206712 char **apNew = (char**)sqlite3_realloc64(p->apShm, nByte);
206959 static void rbuVfsDlError(sqlite3_vfs *pVfs, int nByte, char *zErrMsg){
206961 pRealVfs->xDlError(pRealVfs, nByte, zErrMsg);
206989 static int rbuVfsRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){
206991 return pRealVfs->xRandomness(pRealVfs, nByte, zBufOut);
207071 size_t nByte;
207074 nByte = sizeof(rbu_vfs) + nName + 1;
207075 pNew = (rbu_vfs*)sqlite3_malloc64(nByte);
207080 memset(pNew, 0, nByte);
208826 int nByte; /* Size of serialized value in bytes */
208836 nByte = 1;
208856 nByte = 9;
208879 nByte = 1 + nVarint + n;
208884 nByte = 1;
208888 if( pnWrite ) *pnWrite += nByte;
208897 static void *sessionMalloc64(sqlite3_session *pSession, i64 nByte){
208898 void *pRet = sqlite3_malloc64(nByte);
209458 sqlite3_int64 nByte;
209508 nByte = nThis + 1;
209510 nByte += sqlite3_column_bytes(pStmt, 1);
209516 nByte += nDbCol * (sizeof(const char *) + sizeof(u8) + 1);
209517 pAlloc = sessionMalloc64(pSession, nByte);
209705 int nByte;
209706 nOld = sessionVarintGet(pCsr, &nByte);
209708 nOld += nByte;
209711 && nByte==sqlite3_value_bytes(p)
209712 && (nByte==0 || 0==memcmp(pCsr, sqlite3_value_blob(p), nByte))
209716 pCsr += nByte;
209817 sqlite3_int64 nByte; /* Number of bytes to allocate */
209824 nByte = sizeof(SessionChange);
209837 rc = sessionSerializeValue(0, p, &nByte);
209842 pC = (SessionChange *)sessionMalloc64(pSession, nByte);
209855 nByte = 0;
209863 sessionSerializeValue(&pC->aRecord[nByte], p, &nByte);
209870 pC->nRecord = nByte;
210419 int nByte = sizeof(SessionTable) + nName + 1;
210420 pTab = (SessionTable*)sessionMalloc64(pSession, nByte);
210450 static int sessionBufferGrow(SessionBuffer *p, i64 nByte, int *pRc){
210452 i64 nReq = p->nBuf + nByte;
210496 sqlite3_int64 nByte = 0;
210497 rc = sessionSerializeValue(0, pVal, &nByte);
210498 sessionBufferGrow(p, nByte, &rc);
210501 p->nBuf += nByte;
210648 int nByte;
210654 nByte = sqlite3_column_bytes(pStmt, iCol);
210655 if( z || (eType==SQLITE_BLOB && nByte==0) ){
210656 sessionAppendVarint(p, nByte, pRc);
210657 sessionAppendBlob(p, z, nByte, pRc);
211275 int nByte; /* Number of bytes to allocate for iterator */
211283 nByte = sizeof(sqlite3_changeset_iter);
211284 pRet = (sqlite3_changeset_iter *)sqlite3_malloc(nByte);
211364 static int sessionInputBuffer(SessionInput *pIn, int nByte){
211367 while( !pIn->bEof && (pIn->iNext+nByte)>=pIn->nData && rc==SQLITE_OK ){
211401 int nByte;
211402 aRec += sessionVarintGet((u8*)aRec, &nByte);
211403 aRec += nByte;
211492 int nByte;
211493 pIn->iNext += sessionVarintGet(aVal, &nByte);
211494 rc = sessionInputBuffer(pIn, nByte);
211496 if( nByte<0 || nByte>pIn->nData-pIn->iNext ){
211500 rc = sessionValueSetStr(apOut[i],&pIn->aData[pIn->iNext],nByte,enc);
211501 pIn->iNext += nByte;
211584 int nByte = 0;
211588 rc = sessionInputBuffer(pIn, nByte + 10);
211590 eType = pIn->aData[pIn->iNext + nByte++];
211593 nByte += sessionVarintGet(&pIn->aData[pIn->iNext+nByte], &n);
211594 nByte += n;
211595 rc = sessionInputBuffer(pIn, nByte);
211597 nByte += 8;
211601 *pnByte = nByte;
211629 int nByte;
211635 nByte = p->nCol * sizeof(sqlite3_value*) * 2 + nCopy;
211637 sessionBufferGrow(&p->tblhdr, nByte, &rc);
212037 int nByte;
212040 if( (rc = sessionChangesetBufferTblhdr(pInput, &nByte)) ){
212047 sessionAppendBlob(&sOut, &pInput->aData[pInput->iNext], nByte, &rc);
212050 pInput->iNext += nByte;
212059 int nByte;
212064 rc = sessionChangesetBufferRecord(pInput, nCol, &nByte);
212067 sessionAppendBlob(&sOut, &pInput->aData[pInput->iNext], nByte, &rc);
212068 pInput->iNext += nByte;
212291 int nByte = sizeof(SessionUpdate) * nU32*sizeof(u32);
212293 pUp = (SessionUpdate*)sqlite3_malloc(nByte);
213044 size_t nByte = 2*pApply->nCol*sizeof(sqlite3_value*);
213050 sessionBufferGrow(&pIter2->tblhdr, nByte, &rc);
213052 if( rc==SQLITE_OK ) memset(pIter2->apValue, 0, nByte);
213446 sqlite3_int64 nByte = nRec + pExist->nRecord + sizeof(SessionChange);
213447 pNew = (SessionChange*)sqlite3_malloc64(nByte);
213456 memset(pNew, 0, nByte);
213507 sqlite3_int64 nByte;
213513 nByte = sizeof(SessionChange) + pExist->nRecord + nRec;
213514 pNew = (SessionChange *)sqlite3_malloc64(nByte);
215186 static void *sqlite3Fts5MallocZero(int *pRc, sqlite3_int64 nByte);
215259 int nByte,
217774 sqlite3_int64 nByte; /* Bytes of space to allocate */
217779 nByte = sizeof(Fts5Bm25Data) + nPhrase*2*sizeof(double);
217780 p = (Fts5Bm25Data*)sqlite3_malloc64(nByte);
217784 memset(p, 0, (size_t)nByte);
217933 static int sqlite3Fts5BufferSize(int *pRc, Fts5Buffer *pBuf, u32 nByte){
217934 if( (u32)pBuf->nSpace<nByte ){
217937 while( nNew<nByte ){
218176 static void *sqlite3Fts5MallocZero(int *pRc, sqlite3_int64 nByte){
218179 pRet = sqlite3_malloc64(nByte);
218181 if( nByte>0 ) *pRc = SQLITE_NOMEM;
218183 memset(pRet, 0, (size_t)nByte);
218568 const int nByte = sizeof(int) * FTS5_MAX_PREFIX_INDEXES;
218572 pConfig->aPrefix = sqlite3Fts5MallocZero(&rc, nByte);
218854 sqlite3_int64 nByte;
218862 nByte = nArg * (sizeof(char*) + sizeof(u8));
218863 pRet->azCol = (char**)sqlite3Fts5MallocZero(&rc, nByte);
219558 const int nByte = sizeof(Fts5ExprNode);
219559 pNew->pRoot = (Fts5ExprNode*)sqlite3Fts5MallocZero(&sParse.rc, nByte);
219766 sqlite3_int64 nByte = sizeof(Fts5PoslistReader) * nAlloc * 2;
219767 Fts5PoslistReader *aNew = (Fts5PoslistReader*)sqlite3_malloc64(nByte);
219847 sqlite3_int64 nByte = sizeof(Fts5PoslistReader) * pPhrase->nTerm;
219848 aIter = (Fts5PoslistReader*)sqlite3_malloc64(nByte);
219982 sqlite3_int64 nByte = sizeof(Fts5NearTrimmer) * pNear->nPhrase;
219983 a = (Fts5NearTrimmer*)sqlite3Fts5MallocZero(&rc, nByte);
220891 sqlite3_int64 nByte;
220892 nByte = sizeof(Fts5ExprNearset) + SZALLOC * sizeof(Fts5ExprPhrase*);
220893 pRet = sqlite3_malloc64(nByte);
220897 memset(pRet, 0, (size_t)nByte);
220901 sqlite3_int64 nByte;
220903 nByte = sizeof(Fts5ExprNearset) + nNew * sizeof(Fts5ExprPhrase*);
220904 pRet = (Fts5ExprNearset*)sqlite3_realloc64(pNear, nByte);
220968 sqlite3_int64 nByte = sizeof(Fts5ExprTerm) + sizeof(Fts5Buffer) + nToken+1;
220969 pSyn = (Fts5ExprTerm*)sqlite3_malloc64(nByte);
220973 memset(pSyn, 0, (size_t)nByte);
221037 sqlite3_int64 nByte = sizeof(Fts5ExprPhrase*) * (pParse->nPhrase + 8);
221039 apNew = (Fts5ExprPhrase**)sqlite3_realloc64(pParse->apPhrase, nByte);
221135 sqlite3_int64 nByte;
221137 nByte = sizeof(Fts5Colset) + (pColsetOrig->nCol-1) * sizeof(int);
221138 pColset = (Fts5Colset*)sqlite3Fts5MallocZero(&rc, nByte);
221140 memcpy(pColset, pColsetOrig, (size_t)nByte);
221354 sqlite3_int64 nByte = sizeof(Fts5Colset) + (pOrig->nCol-1) * sizeof(int);
221355 pRet = (Fts5Colset*)sqlite3Fts5MallocZero(pRc, nByte);
221357 memcpy(pRet, pOrig, (size_t)nByte);
221483 int nByte = sizeof(Fts5ExprNode*) * pSub->nChild;
221484 memcpy(&p->apChild[p->nChild], pSub->apChild, nByte);
221509 int nByte;
221515 nByte = sizeof(Fts5ExprNode) + nTerm*sizeof(Fts5ExprNode*);
221516 pRet = (Fts5ExprNode*)sqlite3Fts5MallocZero(&pParse->rc, nByte);
221568 sqlite3_int64 nByte; /* Bytes of space to allocate for this node */
221591 nByte = sizeof(Fts5ExprNode) + sizeof(Fts5ExprNode*)*(nChild-1);
221592 pRet = (Fts5ExprNode*)sqlite3Fts5MallocZero(&pParse->rc, nByte);
221705 sqlite3_int64 nByte = 0;
221711 nByte += (int)strlen(pTerm->zTerm) * 2 + 3 + 2;
221713 zQuoted = sqlite3_malloc64(nByte);
222452 sqlite3_int64 nByte;
222458 nByte = sizeof(Fts5HashEntry*) * pNew->nSlot;
222459 pNew->aSlot = (Fts5HashEntry**)sqlite3_malloc64(nByte);
222465 memset(pNew->aSlot, 0, (size_t)nByte);
222574 int nByte = sqlite3Fts5GetVarintLen((u32)nPos);
222575 memmove(&pPtr[p->iSzPoslist + nByte], &pPtr[p->iSzPoslist + 1], nSz);
222577 nData += (nByte-1);
222632 sqlite3_int64 nByte = sizeof(Fts5HashEntry) + (nToken+1) + 1 + 64;
222633 if( nByte<128 ) nByte = 128;
222643 p = (Fts5HashEntry*)sqlite3_malloc64(nByte);
222646 p->nAlloc = (int)nByte;
223490 static void *fts5IdxMalloc(Fts5Index *p, sqlite3_int64 nByte){
223491 return sqlite3Fts5MallocZero(&p->rc, nByte);
223592 int nByte = sqlite3_blob_bytes(p->pReader);
223593 sqlite3_int64 nAlloc = sizeof(Fts5Data) + nByte + FTS5_DATA_PADDING;
223596 pRet->nn = nByte;
223603 rc = sqlite3_blob_read(p->pReader, aOut, nByte, 0);
223610 pRet->p[nByte] = 0x00;
223611 pRet->p[nByte+1] = 0x00;
223773 i64 nByte = sizeof(Fts5Structure)+(p->nLevel-1)*sizeof(Fts5StructureLevel);
223775 pNew = (Fts5Structure*)sqlite3Fts5MallocZero(pRc, nByte);
223778 memcpy(pNew, p, nByte);
223782 nByte = sizeof(Fts5StructureSegment) * pNew->aLevel[i].nSeg;
223783 pLvl->aSeg = (Fts5StructureSegment*)sqlite3Fts5MallocZero(pRc, nByte);
223791 memcpy(pLvl->aSeg, p->aLevel[i].aSeg, nByte);
223823 sqlite3_int64 nByte; /* Bytes of space to allocate at pRet */
223839 nByte = (
223843 pRet = (Fts5Structure*)sqlite3Fts5MallocZero(&rc, nByte);
223909 sqlite3_int64 nByte = (
223914 pStruct = sqlite3_realloc64(pStruct, nByte);
223939 sqlite3_int64 nByte;
223941 nByte = (pLvl->nSeg + nExtra) * sizeof(Fts5StructureSegment);
223942 aNew = sqlite3_realloc64(pLvl->aSeg, nByte);
224456 sqlite3_int64 nByte = sizeof(Fts5DlidxIter) + i * sizeof(Fts5DlidxLvl);
224459 pNew = (Fts5DlidxIter*)sqlite3_realloc64(pIter, nByte);
226685 size_t nByte = sizeof(Fts5DlidxWriter) * (nLvl - pWriter->nDlidx);
226686 memset(&aDlidx[pWriter->nDlidx], 0, nByte);
227659 sqlite3_int64 nByte = sizeof(Fts5Structure);
227683 nByte += (pStruct->nLevel+1) * sizeof(Fts5StructureLevel);
227684 pNew = (Fts5Structure*)sqlite3Fts5MallocZero(&p->rc, nByte);
227688 nByte = nSeg * sizeof(Fts5StructureSegment);
227693 pLvl->aSeg = (Fts5StructureSegment*)sqlite3Fts5MallocZero(&p->rc, nByte);
227789 int nByte = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING;
227791 if( p->rc==SQLITE_OK && 0==fts5BufferGrow(&p->rc, pBuf, nByte) ){
228388 int nByte,
228394 if( n>=nByte ) return 0; /* Input contains fewer than nChar chars */
228396 if( n>=nByte ) return 0;
228399 if( n>=nByte ){
228455 int nByte = sqlite3Fts5IndexCharlenToBytelen(pToken, nToken, nChar);
228456 if( nByte ){
228459 nByte
228969 int nByte;
228970 iOff += fts5GetVarint32(&pLeaf->p[iOff], nByte);
228971 if( (iOff+nByte)>pLeaf->szLeaf ){
228974 fts5BufferSet(&p->rc, &buf1, nByte, &pLeaf->p[iOff]);
228977 int nKeep, nByte;
228979 iOff += fts5GetVarint32(&pLeaf->p[iOff], nByte);
228980 if( nKeep>buf1.n || (iOff+nByte)>pLeaf->szLeaf ){
228984 fts5BufferAppendBlob(&p->rc, &buf1, nByte, &pLeaf->p[iOff]);
229609 int nByte; /* Bytes of data */
229612 iPgidxOff += fts5GetVarint32(&a[iPgidxOff], nByte);
229613 iPgidxPrev += nByte;
229617 fts5GetVarint32(&a[iPgidxOff], nByte);
229618 iEnd = iPgidxPrev + nByte;
229628 iOff += fts5GetVarint32(&a[iOff], nByte);
229629 if( nByte>term.n ){
229633 term.n = nByte;
229635 iOff += fts5GetVarint32(&a[iOff], nByte);
229636 if( iOff+nByte>n ){
229640 fts5BufferAppendBlob(&rc, &term, nByte, &a[iOff]);
229641 iOff += nByte;
230437 sqlite3_int64 nByte; /* Bytes of space to allocate */
230442 nByte = sizeof(Fts5Cursor) + pConfig->nCol * sizeof(int);
230443 pCsr = (Fts5Cursor*)sqlite3_malloc64(nByte);
230446 memset(pCsr, 0, (size_t)nByte);
230728 sqlite3_int64 nByte;
230734 nByte = sizeof(Fts5Sorter) + sizeof(int) * (nPhrase-1);
230735 pSorter = (Fts5Sorter*)sqlite3_malloc64(nByte);
230737 memset(pSorter, 0, (size_t)nByte);
230854 sqlite3_int64 nByte;
230856 nByte = sizeof(sqlite3_value*)*pCsr->nRankArg;
230857 pCsr->apRankArg = (sqlite3_value**)sqlite3Fts5MallocZero(&rc, nByte);
231659 sqlite3_int64 nByte = sizeof(Fts5PoslistReader) * nIter;
231660 pCsr->aInstIter = (Fts5PoslistReader*)sqlite3Fts5MallocZero(&rc, nByte);
232167 int nByte = sqlite3Fts5ExprPoslist(pCsr->pExpr, i, &dummy);
232168 sqlite3Fts5BufferAppendVarint(&rc, &val, nByte);
232185 int nByte;
232186 rc = sqlite3Fts5ExprPhraseCollist(pCsr->pExpr, i, &dummy, &nByte);
232187 sqlite3Fts5BufferAppendVarint(&rc, &val, nByte);
232352 sqlite3_int64 nByte; /* Bytes of space to allocate */
232355 nByte = sizeof(Fts5Auxiliary) + nName;
232356 pAux = (Fts5Auxiliary*)sqlite3_malloc64(nByte);
232358 memset(pAux, 0, (size_t)nByte);
232389 sqlite3_int64 nByte; /* Bytes of space to allocate */
232393 nByte = sizeof(Fts5TokenizerModule) + nName;
232394 pNew = (Fts5TokenizerModule*)sqlite3_malloc64(nByte);
232396 memset(pNew, 0, (size_t)nByte);
232954 sqlite3_int64 nByte; /* Bytes of space to allocate */
232956 nByte = sizeof(Fts5Storage) /* Fts5Storage object */
232958 *pp = p = (Fts5Storage*)sqlite3_malloc64(nByte);
232961 memset(p, 0, (size_t)nByte);
233535 int nByte = sqlite3Fts5IndexCharlenToBytelen(pToken, nToken, nChar);
233536 if( nByte ){
233537 rc = sqlite3Fts5TermsetAdd(pTermset, ii+1, pToken, nByte, &bPresent);
233540 pCtx->iRowid, iCol, iPos, ii+1, pToken, nByte
233941 static void asciiFold(char *aOut, const char *aIn, int nByte){
233943 for(i=0; i<nByte; i++){
233973 int nByte;
233988 nByte = ie-is;
233989 if( nByte>nFold ){
233991 pFold = sqlite3_malloc64((sqlite3_int64)nByte*2);
233996 nFold = nByte*2;
233998 asciiFold(pFold, &pText[is], nByte);
234001 rc = xToken(pCtx, 0, pFold, nByte, is, ie);
236569 int nByte; /* Bytes of space to allocate */
236583 nByte = sizeof(Fts5VocabTable) + nDb + nTab;
236584 pRet = sqlite3Fts5MallocZero(&rc, nByte);
236753 i64 nByte = pFts5->pConfig->nCol * sizeof(i64)*2 + sizeof(Fts5VocabCursor);
236754 pCsr = (Fts5VocabCursor*)sqlite3Fts5MallocZero(&rc, nByte);