Lines Matching defs:nByte

1685   void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg);
1688 int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut);
2255 #define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */
3605 ** ^If the nByte argument is less than zero, then zSql is read up to the
3606 ** first zero terminator. ^If nByte is non-negative, then it is the maximum
3607 ** number of bytes read from zSql. ^When nByte is non-negative, the
3609 ** the nByte-th byte, whichever comes first. If the caller knows
3611 ** performance advantage to be gained by passing an nByte parameter that
3674 int nByte, /* Maximum length of zSql in bytes. */
3681 int nByte, /* Maximum length of zSql in bytes. */
3688 int nByte, /* Maximum length of zSql in bytes. */
3695 int nByte, /* Maximum length of zSql in bytes. */
10737 int nByte; /* Size in byte of text or blob. */
12204 SQLITE_PRIVATE int sqlite3Utf8CharLen(const char *pData, int nByte);
13874 int nByte = 0; /* Used to accumulate return value */
13877 db->pnBytesFreed = &nByte;
13883 nByte += sqlite3GlobalConfig.m.xRoundup(sizeof(HashElem)) * (
13889 nByte += sqlite3MallocSize(pSchema->tblHash.ht);
13890 nByte += sqlite3MallocSize(pSchema->trigHash.ht);
13891 nByte += sqlite3MallocSize(pSchema->idxHash.ht);
13892 nByte += sqlite3MallocSize(pSchema->fkeyHash.ht);
13906 *pCurrent = nByte;
13917 int nByte = 0; /* Used to accumulate return value */
13919 db->pnBytesFreed = &nByte;
13927 *pCurrent = nByte;
15307 SQLITE_PRIVATE void sqlite3OsDlError(sqlite3_vfs *pVfs, int nByte, char *zBufOut){
15308 pVfs->xDlError(pVfs, nByte, zBufOut);
15317 SQLITE_PRIVATE int sqlite3OsRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){
15318 return pVfs->xRandomness(pVfs, nByte, zBufOut);
15592 static void *sqlite3MemMalloc(int nByte){ return 0; }
15594 static void *sqlite3MemRealloc(void *pPrior, int nByte){ return 0; }
15728 ** For this low-level routine, we are guaranteed that nByte>0 because
15729 ** cases of nByte<=0 will be intercepted and dealt with by higher level
15732 static void *sqlite3MemMalloc(int nByte){
15734 void *p = SQLITE_MALLOC( nByte );
15737 sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes of memory", nByte);
15742 assert( nByte>0 );
15743 nByte = ROUND8(nByte);
15744 p = SQLITE_MALLOC( nByte+8 );
15746 p[0] = nByte;
15750 sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes of memory", nByte);
15797 ** redirected to xMalloc. Similarly, we know that nByte>0 becauses
15798 ** cases where nByte<=0 will have been intercepted by higher-level
15801 static void *sqlite3MemRealloc(void *pPrior, int nByte){
15803 void *p = SQLITE_REALLOC(pPrior, nByte);
15808 SQLITE_MALLOCSIZE(pPrior), nByte);
15813 assert( pPrior!=0 && nByte>0 );
15814 assert( nByte==ROUND8(nByte) ); /* EV: R-46199-30249 */
15816 p = SQLITE_REALLOC(p, nByte+8 );
15818 p[0] = nByte;
15824 sqlite3MemSize(pPrior), nByte);
16122 static void randomFill(char *pBuf, int nByte){
16125 y = nByte | 1;
16126 while( nByte >= 4 ){
16132 nByte -= 4;
16134 while( nByte-- > 0 ){
16143 ** Allocate nByte bytes of memory.
16145 static void *sqlite3MemMalloc(int nByte){
16155 nReserve = ROUND8(nByte);
16181 mem.xBacktrace(nByte, pHdr->nBacktrace-1, &aAddr[1]);
16189 pHdr->iSize = nByte;
16190 adjustStats(nByte, +1);
16193 randomFill((char*)pInt, nByte);
16194 memset(((char*)pInt)+nByte, 0x65, nReserve-nByte);
16246 static void *sqlite3MemRealloc(void *pPrior, int nByte){
16250 assert( (nByte & 7)==0 ); /* EV: R-46199-30249 */
16252 pNew = sqlite3MemMalloc(nByte);
16254 memcpy(pNew, pPrior, nByte<pOldHdr->iSize ? nByte : pOldHdr->iSize);
16255 if( nByte>pOldHdr->iSize ){
16256 randomFill(&((char*)pNew)[pOldHdr->iSize], nByte - pOldHdr->iSize);
16668 static void memsys3OutOfMemory(int nByte){
16673 sqlite3_release_memory(nByte);
16787 static void *memsys3MallocUnsafe(int nByte){
16794 if( nByte<=12 ){
16797 nBlock = (nByte + 11)/8;
17357 ** The caller guarantees that nByte positive.
17363 static void *memsys5MallocUnsafe(int nByte){
17369 /* nByte must be a positive */
17370 assert( nByte>0 );
17374 if( (u32)nByte>mem5.maxRequest ){
17375 mem5.maxRequest = nByte;
17381 if( nByte > 0x40000000 ){
17385 /* Round nByte up to the next valid power of two */
17386 for(iFullSz=mem5.szAtom, iLogsize=0; iFullSz<nByte; iFullSz *= 2, iLogsize++){}
17395 sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes", nByte);
17412 mem5.totalExcess += iFullSz - nByte;
17579 int nByte; /* Number of bytes of memory available to this allocator */
17594 nByte = sqlite3GlobalConfig.nHeap;
17605 mem5.nBlock = (nByte / (mem5.szAtom+sizeof(u8)));
19007 static void sqlite3MallocAlarm(int nByte){
19017 xCallback(pArg, nowUsed, nByte);
21047 ** pZ is a UTF-8 encoded unicode string. If nByte is less than zero,
21049 ** the first 0x00 byte. If nByte is not less than zero, return the
21050 ** number of unicode characters in the first nByte of pZ (or up to
21053 SQLITE_PRIVATE int sqlite3Utf8CharLen(const char *zIn, int nByte){
21057 if( nByte>=0 ){
21058 zTerm = &z[nByte];
21107 SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *db, const void *z, int nByte, u8 enc){
21111 sqlite3VdbeMemSetStr(&m, z, nByte, enc, SQLITE_STATIC);
24974 static int unixMapfile(unixFile *pFd, i64 nByte);
26660 static int unixTruncate(sqlite3_file *id, i64 nByte){
26672 nByte = ((nByte + pFile->szChunk - 1)/pFile->szChunk) * pFile->szChunk;
26675 rc = robust_ftruncate(pFile->h, (off_t)nByte);
26688 if( pFile->inNormalWrite && nByte==0 ){
26697 if( nByte<pFile->mmapSize ){
26698 pFile->mmapSize = nByte;
26746 static int fcntlSizeHint(unixFile *pFile, i64 nByte){
26753 nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk;
26789 if( pFile->mmapSizeMax>0 && nByte>pFile->mmapSize ){
26792 if( robust_ftruncate(pFile->h, nByte) ){
26798 rc = unixMapfile(pFile, nByte);
27415 int nByte = (iRegion+1)*szRegion; /* Minimum required file size */
27430 if( sStat.st_size<nByte ){
27450 assert( (nByte % pgsz)==0 );
27451 for(iPg=(sStat.st_size/pgsz); iPg<(nByte/pgsz); iPg++){
27814 ** If parameter nByte is non-negative, then it is the requested size of
27815 ** the mapping to create. Otherwise, if nByte is less than zero, then the
27824 static int unixMapfile(unixFile *pFd, i64 nByte){
27826 i64 nMap = nByte;
32023 int nByte;
32026 nByte = osWideCharToMultiByte(CP_UTF8, 0, zWideFilename, -1, 0, 0, 0, 0);
32027 if( nByte == 0 ){
32030 zFilename = sqlite3MallocZero( nByte );
32034 nByte = osWideCharToMultiByte(CP_UTF8, 0, zWideFilename, -1, zFilename, nByte,
32036 if( nByte == 0 ){
32051 int nByte;
32055 nByte = osMultiByteToWideChar(codepage, 0, zFilename, -1, NULL,
32057 if( nByte==0 ){
32060 zMbcsFilename = sqlite3MallocZero( nByte*sizeof(zMbcsFilename[0]) );
32064 nByte = osMultiByteToWideChar(codepage, 0, zFilename, -1, zMbcsFilename,
32065 nByte);
32066 if( nByte==0 ){
32081 int nByte;
32085 nByte = osWideCharToMultiByte(codepage, 0, zWideFilename, -1, 0, 0, 0, 0);
32086 if( nByte == 0 ){
32089 zFilename = sqlite3MallocZero( nByte );
32093 nByte = osWideCharToMultiByte(codepage, 0, zWideFilename, -1, zFilename,
32094 nByte, 0, 0);
32095 if( nByte == 0 ){
33039 static int winTruncate(sqlite3_file *id, sqlite3_int64 nByte){
33047 pFile->h, nByte, pFile->locktype));
33055 nByte = ((nByte + pFile->szChunk - 1)/pFile->szChunk) * pFile->szChunk;
33059 if( seekWinFile(pFile, nByte) ){
33074 if( pFile->pMapRegion && nByte<pFile->mmapSize ){
33075 pFile->mmapSize = nByte;
33783 int nByte /* Number of bytes to lock or unlock */
33791 pFile->hFile.h, lockType, ofst, nByte));
33795 rc = winUnlockFile(&pFile->hFile.h, ofst, 0, nByte, 0);
33800 rc = winLockFile(&pFile->hFile.h, dwFlags, ofst, 0, nByte, 0);
34188 int nByte = (iRegion+1)*szRegion; /* Minimum required file size */
34204 if( sz<nByte ){
34212 rc = winTruncate((sqlite3_file *)&pShmNode->hFile, nByte);
34236 NULL, PAGE_READWRITE, nByte, NULL
34240 NULL, PAGE_READWRITE, 0, nByte, NULL
34244 NULL, PAGE_READWRITE, 0, nByte, NULL
34248 osGetCurrentProcessId(), pShmNode->nRegion, nByte,
34344 ** If parameter nByte is non-negative, then it is the requested size of
34345 ** the mapping to create. Otherwise, if nByte is less than zero, then the
34354 static int winMapfile(winFile *pFd, sqlite3_int64 nByte){
34355 sqlite3_int64 nMap = nByte;
34360 osGetCurrentProcessId(), pFd, nByte));
35261 DWORD nByte;
35295 nByte = osGetFullPathNameW((LPCWSTR)zConverted, 0, 0, 0);
35296 if( nByte==0 ){
35302 nByte += 3;
35303 zTemp = sqlite3MallocZero( nByte*sizeof(zTemp[0]) );
35308 nByte = osGetFullPathNameW((LPCWSTR)zConverted, nByte, zTemp, 0);
35309 if( nByte==0 ){
35323 nByte = osGetFullPathNameA((char*)zConverted, 0, 0, 0);
35324 if( nByte==0 ){
35330 nByte += 3;
35331 zTemp = sqlite3MallocZero( nByte*sizeof(zTemp[0]) );
35336 nByte = osGetFullPathNameA((char*)zConverted, nByte, zTemp, 0);
35337 if( nByte==0 ){
36854 static void *pcache1Alloc(int nByte){
36857 sqlite3StatusSet(SQLITE_STATUS_PAGECACHE_SIZE, nByte);
36858 if( nByte<=pcache1.szSlot ){
36874 p = sqlite3Malloc(nByte);
39500 static u32 pager_datahash(int nByte, unsigned char *pData){
39503 for(i=0; i<nByte; i++){
41939 i64 nByte = 0;
41942 rc = sqlite3OsFileSize(pPager->fd, &nByte);
41951 pPager->dbSize = (Pgno)((nByte+pageSize-1)/pageSize);
46019 int nByte = sizeof(u32*)*(iPage+1);
46021 apNew = (volatile u32 **)sqlite3_realloc((void *)pWal->apWiData, nByte);
46088 ** nByte must be a positive multiple of 8.
46093 int nByte, /* Bytes of content in a[]. Must be a multiple of 8. */
46099 u32 *aEnd = (u32 *)&a[nByte];
46108 assert( nByte>=8 );
46109 assert( (nByte&0x00000007)==0 );
46410 int nByte; /* Number of bytes to zero in aPgno[] */
46442 nByte = (int)((char *)aHash - (char *)&aPgno[iLimit+1]);
46443 memset((void *)&aPgno[iLimit+1], 0, nByte);
46490 int nByte = (int)((u8 *)&aHash[HASHTABLE_NSLOT] - (u8 *)&aPgno[1]);
46491 memset((void*)&aPgno[1], 0, nByte);
47022 int nByte; /* Number of bytes to allocate */
47035 nByte = sizeof(WalIterator)
47038 p = (WalIterator *)sqlite3ScratchMalloc(nByte);
47042 memset(p, 0, nByte);
50717 ** Allocate nByte bytes of space from within the B-Tree page passed
50729 static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
50741 assert( nByte>=0 ); /* Minimum cell size is 4 */
50742 assert( pPage->nFree>=nByte );
50745 assert( nByte < usableSize-8 );
50773 if( size>=nByte ){
50774 int x = size - nByte;
50798 testcase( gap+2+nByte==top );
50799 if( gap+2+nByte>top ){
50803 assert( gap+nByte<=top );
50813 top -= nByte;
50815 assert( top+nByte <= (int)pPage->pBt->usableSize );
53449 ** If argument eOp is false, then nByte bytes of data are copied
53451 ** then sqlite3PagerWrite() is called on pDbPage and nByte bytes
53459 int nByte, /* Number of bytes to copy */
53469 memcpy(pPayload, pBuf, nByte);
53472 memcpy(pBuf, pPayload, nByte);
58746 i64 nByte = sqlite3BtreeGetPageSize(pFrom)*(i64)sqlite3BtreeLastPage(pFrom);
58747 rc = sqlite3OsFileControl(pFd, SQLITE_FCNTL_OVERWRITE, &nByte);
58937 int nByte;
58942 /* Set nByte to the number of bytes required to store the expanded blob. */
58943 nByte = pMem->n + pMem->u.nZero;
58944 if( nByte<=0 ){
58945 nByte = 1;
58947 if( sqlite3VdbeMemGrow(pMem, nByte, 1) ){
58993 const int nByte = 32;
59003 if( sqlite3VdbeMemGrow(pMem, nByte, 0) ){
59014 sqlite3_snprintf(nByte, pMem->z, "%lld", pMem->u.i);
59017 sqlite3_snprintf(nByte, pMem->z, "%!.15g", pMem->r);
59483 int nByte = n; /* New value for pMem->n */
59502 if( nByte<0 ){
59505 for(nByte=0; nByte<=iLimit && z[nByte]; nByte++){}
59507 for(nByte=0; nByte<=iLimit && (z[nByte] | z[nByte+1]); nByte+=2){}
59517 int nAlloc = nByte;
59521 if( nByte>iLimit ){
59539 pMem->n = nByte;
59550 if( nByte>iLimit ){
60265 int nByte = (p->nSub+1)*sizeof(SubProgram*);
60271 p->apSub = sqlite3DbReallocOrFree(v->db, p->apSub, nByte);
60677 int nField, nByte;
60680 nByte = sizeof(*pKeyInfo) + (nField-1)*sizeof(pKeyInfo->aColl[0]) + nField;
60681 pKeyInfo = sqlite3DbMallocRaw(0, nByte);
60685 memcpy((char*)pKeyInfo, zP4, nByte - nField);
61172 int nByte = (nSub+1)*sizeof(SubProgram*);
61177 if( j==nSub && SQLITE_OK==sqlite3VdbeMemGrow(pSub, nByte, nSub!=0) ){
61311 ** nByte is the number of bytes of space needed.
61323 int nByte, /* Number of bytes to allocate */
61330 nByte = ROUND8(nByte);
61331 if( &(*ppFrom)[nByte] <= pEnd ){
61333 *ppFrom += nByte;
61335 *pnByte += nByte;
61411 int nByte; /* How much extra memory is needed */
61464 nByte = 0;
61465 p->aMem = allocSpace(p->aMem, nMem*sizeof(Mem), &zCsr, zEnd, &nByte);
61466 p->aVar = allocSpace(p->aVar, nVar*sizeof(Mem), &zCsr, zEnd, &nByte);
61467 p->apArg = allocSpace(p->apArg, nArg*sizeof(Mem*), &zCsr, zEnd, &nByte);
61468 p->azVar = allocSpace(p->azVar, nVar*sizeof(char*), &zCsr, zEnd, &nByte);
61470 &zCsr, zEnd, &nByte);
61471 p->aOnceFlag = allocSpace(p->aOnceFlag, nOnce, &zCsr, zEnd, &nByte);
61472 if( nByte ){
61473 p->pFree = sqlite3DbMallocZero(db, nByte);
61476 zEnd = &zCsr[nByte];
61477 }while( nByte && !db->mallocFailed );
62823 int nByte; /* Number of bytes required for *p */
62830 nByte = ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*(pKeyInfo->nField+1);
62831 if( nByte>szSpace+nOff ){
62832 p = (UnpackedRecord *)sqlite3DbMallocRaw(pKeyInfo->db, nByte);
63756 SQLITE_API void *sqlite3_aggregate_context(sqlite3_context *p, int nByte){
63761 testcase( nByte<0 );
63763 if( nByte<=0 ){
63768 sqlite3VdbeMemGrow(pMem, nByte, 0);
63772 memset(pMem->z, 0, nByte);
65011 int nByte;
65013 nByte =
65023 if( SQLITE_OK==sqlite3VdbeMemGrow(pMem, nByte, 0) ){
65492 i64 nByte;
65572 i64 nByte; /* Data space required for this record */
65791 int nByte; /* Bytes of runtime space required for sub-program */
66527 i64 nByte;
66541 u.ag.nByte = pIn1->n + pIn2->n;
66542 if( u.ag.nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){
66546 if( sqlite3VdbeMemGrow(pOut, (int)u.ag.nByte+2, pOut==pIn2) ){
66553 pOut->z[u.ag.nByte] = 0;
66554 pOut->z[u.ag.nByte+1] = 0;
66556 pOut->n = (int)u.ag.nByte;
67877 i64 nByte; /* Data space required for this record */
67950 u.aq.nByte = u.aq.nHdr+u.aq.nData-u.aq.nZero;
67951 if( u.aq.nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){
67960 if( sqlite3VdbeMemGrow(pOut, (int)u.aq.nByte, 0) ){
67972 u.aq.i += sqlite3VdbeSerialPut(&u.aq.zNewRecord[u.aq.i], (int)(u.aq.nByte-u.aq.i), u.aq.pRec,u.aq.file_format);
67974 assert( u.aq.i==u.aq.nByte );
67977 pOut->n = (int)u.aq.nByte;
70560 int nByte; /* Bytes of runtime space required for sub-program */
70607 u.cd.nByte = ROUND8(sizeof(VdbeFrame))
70611 u.cd.pFrame = sqlite3DbMallocZero(db, u.cd.nByte);
71729 int nByte; /* Size of open blob, in bytes */
71779 p->nByte = sqlite3VdbeSerialTypeLen(type);
72076 if( n<0 || iOffset<0 || (iOffset+n)>p->nByte ){
72123 ** The Incrblob.nByte field is fixed for the lifetime of the Incrblob
72128 return (p && p->pStmt) ? p->nByte : 0;
72342 ** Read nByte bytes of data from the stream of data iterated by object p.
72353 int nByte, /* Bytes of data to read */
72383 if( nByte<=nAvail ){
72388 p->iReadOff += nByte;
72396 if( p->nAlloc<nByte ){
72398 while( nByte>nNew ) nNew = nNew*2;
72408 nRem = nByte - nAvail;
72422 memcpy(&p->aAlloc[nByte - nRem], aNext, nCopy);
72529 u64 nByte; /* Size of PMA in bytes */
72531 rc = vdbeSorterIterVarint(db, pIter, &nByte);
72532 pIter->iEof = pIter->iReadOff + nByte;
72533 *pnByte += nByte;
72868 int nByte;
72870 nByte = sqlite3PutVarint(aByte, iVal);
72871 fileWriterWrite(p, aByte, nByte);
72992 i64 nByte = 0; /* Total bytes in all opened PMAs */
72997 rc = vdbeSorterIterInit(db, pSorter, pSorter->iReadOff, pIter, &nByte);
73008 *pnByte = nByte;
73022 int nByte; /* Bytes of space required for aIter/aTree */
73045 nByte = N * (sizeof(int) + sizeof(VdbeSorterIter));
73046 pSorter->aIter = (VdbeSorterIter *)sqlite3DbMallocZero(db, nByte);
75980 int nByte = dupedExprStructSize(p, flags) & 0xfff;
75982 nByte += sqlite3Strlen30(p->u.zToken)+1;
75984 return ROUND8(nByte);
76001 int nByte = 0;
76003 nByte = dupedExprNodeSize(p, flags);
76005 nByte += dupedExprSize(p->pLeft, flags) + dupedExprSize(p->pRight, flags);
76008 return nByte;
76163 int nByte;
76165 nByte = sizeof(*p) + (p->nSrc>0 ? sizeof(p->a[0]) * (p->nSrc-1) : 0);
76166 pNew = sqlite3DbMallocRaw(db, nByte );
81273 pSample->nByte = n;
84436 int nByte;
84461 nByte = sizeof(*pFKey) + (nCol-1)*sizeof(pFKey->aCol[0]) + pTo->n + 1;
84464 nByte += sqlite3Strlen30(pToCol->a[i].zName) + 1;
84467 pFKey = sqlite3DbMallocZero(db, nByte );
87506 ** Allocate nByte bytes of space using sqlite3_malloc(). If the
87509 ** If nByte is larger than the maximum string or blob length, then
87512 static void *contextMalloc(sqlite3_context *context, i64 nByte){
87515 assert( nByte>0 );
87516 testcase( nByte==db->aLimit[SQLITE_LIMIT_LENGTH] );
87517 testcase( nByte==db->aLimit[SQLITE_LIMIT_LENGTH]+1 );
87518 if( nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){
87522 z = sqlite3Malloc((int)nByte);
93298 int nByte = (wsdAutoext.nExt+1)*sizeof(wsdAutoext.aExt[0]);
93300 aNew = sqlite3_realloc(wsdAutoext.aExt, nByte);
106333 int nByte; /* Byte of memory needed for pIdx */
106396 nByte = sizeof(Index);
106397 nByte += nColumn*sizeof(int); /* Index.aiColumn */
106398 nByte += nColumn*sizeof(char*); /* Index.azColl */
106399 nByte += nColumn; /* Index.aSortOrder */
106400 pIdx = sqlite3DbMallocZero(pParse->db, nByte);
106930 db, pColl->enc, aSample[i].u.z, aSample[i].nByte, &nSample
106941 c = pColl->xCmp(pColl->pUser, aSample[i].nByte, aSample[i].u.z, n, z);
116948 int nByte = nUri+2; /* Bytes of space to allocate */
116954 for(iIn=0; iIn<nUri; iIn++) nByte += (zUri[iIn]=='&');
116955 zFile = sqlite3_malloc(nByte);
120358 int nByte; /* Size of allocation used for *p */
120564 nByte = sizeof(Fts3Table) + /* Fts3Table */
120570 p = (Fts3Table*)sqlite3_malloc(nByte);
120575 memset(p, 0, nByte);
120620 assert( zCsr <= &((char *)p)[nByte] );
121897 int nByte = (pCsr->nSegment + 16)*sizeof(Fts3SegReader*);
121898 apNew = (Fts3SegReader **)sqlite3_realloc(pCsr->apSegment, nByte);
123554 sqlite3_int64 nByte = 0;
123566 a += sqlite3Fts3GetVarint(a, &nByte);
123568 if( nDoc==0 || nByte==0 ){
123574 pCsr->nRowAvg = (int)(((nByte / nDoc) + p->nPgsz) / p->nPgsz);
124717 int nByte; /* Bytes of space to allocate here */
124748 nByte = sizeof(Fts3auxTable) + sizeof(Fts3Table) + nDb + nFts3 + 2;
124749 p = (Fts3auxTable *)sqlite3_malloc(nByte);
124751 memset(p, 0, nByte);
125260 ** Allocate nByte bytes of memory using sqlite3_malloc(). If successful,
125264 static void *fts3MallocZero(int nByte){
125265 void *pRet = sqlite3_malloc(nByte);
125266 if( pRet ) memset(pRet, 0, nByte);
125328 int nByte; /* total space to allocate */
125332 nByte = sizeof(Fts3Expr) + sizeof(Fts3Phrase) + nToken;
125333 pRet = (Fts3Expr *)fts3MallocZero(nByte);
125442 int nByte = 0, iBegin = 0, iEnd = 0, iPos = 0;
125443 rc = pModule->xNext(pCursor, &zByte, &nByte, &iBegin, &iEnd, &iPos);
125450 zTemp = fts3ReallocOrFree(zTemp, nTemp + nByte);
125457 memcpy(&zTemp[nTemp], zByte, nByte);
125458 nTemp += nByte;
125460 pToken->n = nByte;
125765 int nByte = 0;
125766 rc = getNextNode(pParse, zIn, nIn, &p, &nByte);
125850 assert( nByte>0 );
125852 assert( rc!=SQLITE_OK || (nByte>0 && nByte<=nIn) );
125853 nIn -= nByte;
125854 zIn += nByte;
128293 int nByte = 0;
128297 nByte += (int)(strlen(argv[i]) + 1);
128300 *pazDequote = azDequote = sqlite3_malloc(sizeof(char *)*argc + nByte);
128523 int nByte = sqlite3_value_bytes(apVal[0]);
128524 pCsr->zInput = sqlite3_malloc(nByte+1);
128528 memcpy(pCsr->zInput, zByte, nByte);
128529 pCsr->zInput[nByte] = 0;
128530 rc = pTab->pMod->xOpen(pTab->pTok, pCsr->zInput, nByte, &pCsr->pCsr);
129828 int nByte = sqlite3_blob_bytes(p->pSegments);
129829 *pnBlob = nByte;
129831 char *aByte = sqlite3_malloc(nByte + FTS3_NODE_PADDING);
129835 if( pnLoad && nByte>(FTS3_NODE_CHUNK_THRESHOLD) ){
129836 nByte = FTS3_NODE_CHUNKSIZE;
129837 *pnLoad = nByte;
129839 rc = sqlite3_blob_read(p->pSegments, aByte, nByte, 0);
129840 memset(&aByte[nByte], 0, FTS3_NODE_PADDING);
129886 static int fts3SegReaderRequire(Fts3SegReader *pReader, char *pFrom, int nByte){
129892 && (pFrom - pReader->aNode + nByte)>pReader->nPopulate
130342 int nByte = sizeof(Fts3SegReader) + (nElem+1)*sizeof(Fts3HashElem *);
130343 pReader = (Fts3SegReader *)sqlite3_malloc(nByte);
130347 memset(pReader, 0, nByte);
131485 int nByte;
131514 nByte = sqlite3Fts3VarintLen(iDelta) + (isRequirePos?nList+1:0);
131515 if( nDoclist+nByte>pCsr->nBuffer ){
131517 pCsr->nBuffer = (nDoclist+nByte)*2;
131920 int nByte = sizeof(u32) * (p->nColumn+1)*3;
131921 aSz = (u32 *)sqlite3_malloc(nByte);
131925 memset(aSz, 0, nByte);
131985 int nByte; /* Bytes allocated at pCsr->apSegment[] */
131989 nByte = sizeof(Fts3SegReader *) * nSeg;
131990 pCsr->apSegment = (Fts3SegReader **)sqlite3_malloc(nByte);
131995 memset(pCsr->apSegment, 0, nByte);
134456 int nByte; /* Number of bytes of space to allocate */
134473 nByte = sizeof(SnippetPhrase) * nList;
134474 sIter.aPhrase = (SnippetPhrase *)sqlite3_malloc(nByte);
134478 memset(sIter.aPhrase, 0, nByte);
136918 int nByte = (NCELL(pNode) - iCell - 1) * pRtree->nBytesPerCell;
136919 memmove(pDst, pSrc, nByte);
138361 int nByte = (pRtree->nDim+1)*(sizeof(int*)+nCell*sizeof(int));
138363 aaSorted = (int **)sqlite3_malloc(nByte);
138369 memset(aaSorted, 0, nByte);
140382 int nByte = 0;
140407 if( nByte ){
140408 char *zNew = sqlite3_realloc(pCsr->zBuffer, nByte);
140413 pCsr->nBuffer = nByte;
140417 pCsr->zBuffer, pCsr->nBuffer, &nByte, /* Output vars */
140421 } while( nByte>pCsr->nBuffer );
140424 *pnBytes = nByte;