Lines Matching refs:nByte

1389   void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg);
1392 int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut);
2004 #define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */
2019 #define SQLITE_CONFIG_WIN32_HEAPSIZE 23 /* int nByte */
3433 ** ^If the nByte argument is negative, then zSql is read up to the
3434 ** first zero terminator. ^If nByte is positive, then it is the
3435 ** number of bytes read from zSql. ^If nByte is zero, then no prepared
3438 ** there is a small performance advantage to passing an nByte parameter that
3499 int nByte, /* Maximum length of zSql in bytes. */
3506 int nByte, /* Maximum length of zSql in bytes. */
3513 int nByte, /* Maximum length of zSql in bytes. */
3520 int nByte, /* Maximum length of zSql in bytes. */
13372 SQLITE_PRIVATE int sqlite3Utf8CharLen(const char *pData, int nByte);
15222 int nByte = 0; /* Used to accumulate return value */
15225 db->pnBytesFreed = &nByte;
15231 nByte += sqlite3GlobalConfig.m.xRoundup(sizeof(HashElem)) * (
15237 nByte += sqlite3MallocSize(pSchema->tblHash.ht);
15238 nByte += sqlite3MallocSize(pSchema->trigHash.ht);
15239 nByte += sqlite3MallocSize(pSchema->idxHash.ht);
15240 nByte += sqlite3MallocSize(pSchema->fkeyHash.ht);
15254 *pCurrent = nByte;
15265 int nByte = 0; /* Used to accumulate return value */
15267 db->pnBytesFreed = &nByte;
15275 *pCurrent = nByte;
16692 SQLITE_PRIVATE void sqlite3OsDlError(sqlite3_vfs *pVfs, int nByte, char *zBufOut){
16693 pVfs->xDlError(pVfs, nByte, zBufOut);
16702 SQLITE_PRIVATE int sqlite3OsRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){
16703 return pVfs->xRandomness(pVfs, nByte, zBufOut);
16981 static void *sqlite3MemMalloc(int nByte){ return 0; }
16983 static void *sqlite3MemRealloc(void *pPrior, int nByte){ return 0; }
17133 ** For this low-level routine, we are guaranteed that nByte>0 because
17134 ** cases of nByte<=0 will be intercepted and dealt with by higher level
17137 static void *sqlite3MemMalloc(int nByte){
17139 void *p = SQLITE_MALLOC( nByte );
17142 sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes of memory", nByte);
17147 assert( nByte>0 );
17148 nByte = ROUND8(nByte);
17149 p = SQLITE_MALLOC( nByte+8 );
17151 p[0] = nByte;
17155 sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes of memory", nByte);
17202 ** redirected to xMalloc. Similarly, we know that nByte>0 because
17203 ** cases where nByte<=0 will have been intercepted by higher-level
17206 static void *sqlite3MemRealloc(void *pPrior, int nByte){
17208 void *p = SQLITE_REALLOC(pPrior, nByte);
17213 SQLITE_MALLOCSIZE(pPrior), nByte);
17218 assert( pPrior!=0 && nByte>0 );
17219 assert( nByte==ROUND8(nByte) ); /* EV: R-46199-30249 */
17221 p = SQLITE_REALLOC(p, nByte+8 );
17223 p[0] = nByte;
17229 sqlite3MemSize(pPrior), nByte);
17527 static void randomFill(char *pBuf, int nByte){
17530 y = nByte | 1;
17531 while( nByte >= 4 ){
17537 nByte -= 4;
17539 while( nByte-- > 0 ){
17548 ** Allocate nByte bytes of memory.
17550 static void *sqlite3MemMalloc(int nByte){
17560 nReserve = ROUND8(nByte);
17586 mem.xBacktrace(nByte, pHdr->nBacktrace-1, &aAddr[1]);
17594 pHdr->iSize = nByte;
17595 adjustStats(nByte, +1);
17598 randomFill((char*)pInt, nByte);
17599 memset(((char*)pInt)+nByte, 0x65, nReserve-nByte);
17651 static void *sqlite3MemRealloc(void *pPrior, int nByte){
17655 assert( (nByte & 7)==0 ); /* EV: R-46199-30249 */
17657 pNew = sqlite3MemMalloc(nByte);
17659 memcpy(pNew, pPrior, (int)(nByte<pOldHdr->iSize ? nByte : pOldHdr->iSize));
17660 if( nByte>pOldHdr->iSize ){
17661 randomFill(&((char*)pNew)[pOldHdr->iSize], nByte - (int)pOldHdr->iSize);
18073 static void memsys3OutOfMemory(int nByte){
18078 sqlite3_release_memory(nByte);
18192 static void *memsys3MallocUnsafe(int nByte){
18199 if( nByte<=12 ){
18202 nBlock = (nByte + 11)/8;
18743 ** The caller guarantees that nByte is positive.
18749 static void *memsys5MallocUnsafe(int nByte){
18755 /* nByte must be a positive */
18756 assert( nByte>0 );
18760 if( (u32)nByte>mem5.maxRequest ){
18761 mem5.maxRequest = nByte;
18767 if( nByte > 0x40000000 ){
18771 /* Round nByte up to the next valid power of two */
18772 for(iFullSz=mem5.szAtom, iLogsize=0; iFullSz<nByte; iFullSz *= 2, iLogsize++){}
18781 sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes", nByte);
18799 mem5.totalExcess += iFullSz - nByte;
18979 int nByte; /* Number of bytes of memory available to this allocator */
18994 nByte = sqlite3GlobalConfig.nHeap;
19005 mem5.nBlock = (nByte / (mem5.szAtom+sizeof(u8)));
20766 static void sqlite3MallocAlarm(int nByte){
20776 xCallback(pArg, nowUsed, nByte);
23271 ** pZ is a UTF-8 encoded unicode string. If nByte is less than zero,
23273 ** the first 0x00 byte. If nByte is not less than zero, return the
23274 ** number of unicode characters in the first nByte of pZ (or up to
23277 SQLITE_PRIVATE int sqlite3Utf8CharLen(const char *zIn, int nByte){
23281 if( nByte>=0 ){
23282 zTerm = &z[nByte];
23331 SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *db, const void *z, int nByte, u8 enc){
23335 sqlite3VdbeMemSetStr(&m, z, nByte, enc, SQLITE_STATIC);
27365 static int unixMapfile(unixFile *pFd, i64 nByte);
29060 static int unixTruncate(sqlite3_file *id, i64 nByte){
29072 nByte = ((nByte + pFile->szChunk - 1)/pFile->szChunk) * pFile->szChunk;
29075 rc = robust_ftruncate(pFile->h, nByte);
29088 if( pFile->inNormalWrite && nByte==0 ){
29098 if( nByte<pFile->mmapSize ){
29099 pFile->mmapSize = nByte;
29148 static int fcntlSizeHint(unixFile *pFile, i64 nByte){
29157 nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk;
29198 if( pFile->mmapSizeMax>0 && nByte>pFile->mmapSize ){
29201 if( robust_ftruncate(pFile->h, nByte) ){
29207 rc = unixMapfile(pFile, nByte);
29888 int nByte = nReqRegion*szRegion; /* Minimum required file size */
29903 if( sStat.st_size<nByte ){
29923 assert( (nByte % pgsz)==0 );
29924 for(iPg=(sStat.st_size/pgsz); iPg<(nByte/pgsz); iPg++){
30280 ** If parameter nByte is non-negative, then it is the requested size of
30281 ** the mapping to create. Otherwise, if nByte is less than zero, then the
30290 static int unixMapfile(unixFile *pFd, i64 nByte){
30291 i64 nMap = nByte;
34843 int nByte;
34846 nByte = osWideCharToMultiByte(CP_UTF8, 0, zWideFilename, -1, 0, 0, 0, 0);
34847 if( nByte == 0 ){
34850 zFilename = sqlite3MallocZero( nByte );
34854 nByte = osWideCharToMultiByte(CP_UTF8, 0, zWideFilename, -1, zFilename, nByte,
34856 if( nByte == 0 ){
34871 int nByte;
34875 nByte = osMultiByteToWideChar(codepage, 0, zFilename, -1, NULL,
34877 if( nByte==0 ){
34880 zMbcsFilename = sqlite3MallocZero( nByte*sizeof(zMbcsFilename[0]) );
34884 nByte = osMultiByteToWideChar(codepage, 0, zFilename, -1, zMbcsFilename,
34885 nByte);
34886 if( nByte==0 ){
34901 int nByte;
34905 nByte = osWideCharToMultiByte(codepage, 0, zWideFilename, -1, 0, 0, 0, 0);
34906 if( nByte == 0 ){
34909 zFilename = sqlite3MallocZero( nByte );
34913 nByte = osWideCharToMultiByte(codepage, 0, zWideFilename, -1, zFilename,
34914 nByte, 0, 0);
34915 if( nByte == 0 ){
35903 static int winTruncate(sqlite3_file *id, sqlite3_int64 nByte){
35911 osGetCurrentProcessId(), pFile, pFile->h, nByte, pFile->locktype));
35919 nByte = ((nByte + pFile->szChunk - 1)/pFile->szChunk) * pFile->szChunk;
35923 if( winSeekFile(pFile, nByte) ){
35938 if( pFile->pMapRegion && nByte<pFile->mmapSize ){
35939 pFile->mmapSize = nByte;
36697 int nByte /* Number of bytes to lock or unlock */
36705 pFile->hFile.h, lockType, ofst, nByte));
36709 rc = winUnlockFile(&pFile->hFile.h, ofst, 0, nByte, 0);
36714 rc = winLockFile(&pFile->hFile.h, dwFlags, ofst, 0, nByte, 0);
37103 int nByte = (iRegion+1)*szRegion; /* Minimum required file size */
37119 if( sz<nByte ){
37127 rc = winTruncate((sqlite3_file *)&pShmNode->hFile, nByte);
37151 NULL, PAGE_READWRITE, nByte, NULL
37155 NULL, PAGE_READWRITE, 0, nByte, NULL
37159 NULL, PAGE_READWRITE, 0, nByte, NULL
37163 osGetCurrentProcessId(), pShmNode->nRegion, nByte,
37259 ** If parameter nByte is non-negative, then it is the requested size of
37260 ** the mapping to create. Otherwise, if nByte is less than zero, then the
37269 static int winMapfile(winFile *pFd, sqlite3_int64 nByte){
37270 sqlite3_int64 nMap = nByte;
37275 osGetCurrentProcessId(), pFd, nByte));
38412 DWORD nByte;
38446 nByte = osGetFullPathNameW((LPCWSTR)zConverted, 0, 0, 0);
38447 if( nByte==0 ){
38452 nByte += 3;
38453 zTemp = sqlite3MallocZero( nByte*sizeof(zTemp[0]) );
38458 nByte = osGetFullPathNameW((LPCWSTR)zConverted, nByte, zTemp, 0);
38459 if( nByte==0 ){
38472 nByte = osGetFullPathNameA((char*)zConverted, 0, 0, 0);
38473 if( nByte==0 ){
38478 nByte += 3;
38479 zTemp = sqlite3MallocZero( nByte*sizeof(zTemp[0]) );
38484 nByte = osGetFullPathNameA((char*)zConverted, nByte, zTemp, 0);
38485 if( nByte==0 ){
40120 static void *pcache1Alloc(int nByte){
40123 if( nByte<=pcache1.szSlot ){
40131 sqlite3StatusSet(SQLITE_STATUS_PAGECACHE_SIZE, nByte);
40140 p = sqlite3Malloc(nByte);
40145 sqlite3StatusSet(SQLITE_STATUS_PAGECACHE_SIZE, nByte);
42810 static u32 pager_datahash(int nByte, unsigned char *pData){
42813 for(i=0; i<nByte; i++){
45254 i64 nByte = 0;
45257 rc = sqlite3OsFileSize(pPager->fd, &nByte);
45271 pPager->dbSize = (Pgno)((nByte+pageSize-1)/pageSize);
49425 int nByte = sizeof(u32*)*(iPage+1);
49427 apNew = (volatile u32 **)sqlite3_realloc64((void *)pWal->apWiData, nByte);
49494 ** nByte must be a positive multiple of 8.
49499 int nByte, /* Bytes of content in a[]. Must be a multiple of 8. */
49505 u32 *aEnd = (u32 *)&a[nByte];
49514 assert( nByte>=8 );
49515 assert( (nByte&0x00000007)==0 );
49817 int nByte; /* Number of bytes to zero in aPgno[] */
49849 nByte = (int)((char *)aHash - (char *)&aPgno[iLimit+1]);
49850 memset((void *)&aPgno[iLimit+1], 0, nByte);
49897 int nByte = (int)((u8 *)&aHash[HASHTABLE_NSLOT] - (u8 *)&aPgno[1]);
49898 memset((void*)&aPgno[1], 0, nByte);
50429 int nByte; /* Number of bytes to allocate */
50442 nByte = sizeof(WalIterator)
50445 p = (WalIterator *)sqlite3_malloc64(nByte);
50449 memset(p, 0, nByte);
54298 ** Search the free-list on page pPg for space to store a cell nByte bytes in
54307 ** If a slot of at least nByte bytes is found but cannot be used because
54311 static u8 *pageFindSlot(MemPage *pPg, int nByte, int *pRc, int *pbDefrag){
54330 if( size>=nByte ){
54331 int x = size - nByte;
54361 ** Allocate nByte bytes of space from within the B-Tree page passed
54373 static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
54383 assert( nByte>=0 ); /* Minimum cell size is 4 */
54384 assert( pPage->nFree>=nByte );
54386 assert( nByte < (int)(pPage->pBt->usableSize-8) );
54408 u8 *pSpace = pageFindSlot(pPage, nByte, &rc, &bDefrag);
54421 testcase( gap+2+nByte==top );
54422 if( gap+2+nByte>top ){
54428 assert( gap+nByte<=top );
54438 top -= nByte;
54440 assert( top+nByte <= (int)pPage->pBt->usableSize );
57183 ** If argument eOp is false, then nByte bytes of data are copied
57185 ** then sqlite3PagerWrite() is called on pDbPage and nByte bytes
57193 int nByte, /* Number of bytes to copy */
57203 memcpy(pPayload, pBuf, nByte);
57206 memcpy(pBuf, pPayload, nByte);
63046 i64 nByte = sqlite3BtreeGetPageSize(pFrom)*(i64)sqlite3BtreeLastPage(pFrom);
63047 rc = sqlite3OsFileControl(pFd, SQLITE_FCNTL_OVERWRITE, &nByte);
63305 int nByte;
63310 /* Set nByte to the number of bytes required to store the expanded blob. */
63311 nByte = pMem->n + pMem->u.nZero;
63312 if( nByte<=0 ){
63313 nByte = 1;
63315 if( sqlite3VdbeMemGrow(pMem, nByte, 1) ){
63371 const int nByte = 32;
63381 if( sqlite3VdbeMemClearAndResize(pMem, nByte) ){
63392 sqlite3_snprintf(nByte, pMem->z, "%lld", pMem->u.i);
63395 sqlite3_snprintf(nByte, pMem->z, "%!.15g", pMem->u.r);
63943 int nByte = n; /* New value for pMem->n */
63962 if( nByte<0 ){
63965 nByte = sqlite3Strlen30(z);
63966 if( nByte>iLimit ) nByte = iLimit+1;
63968 for(nByte=0; nByte<=iLimit && (z[nByte] | z[nByte+1]); nByte+=2){}
63978 int nAlloc = nByte;
63982 if( nByte>iLimit ){
64003 pMem->n = nByte;
64013 if( nByte>iLimit ){
64190 int nByte; /* Bytes of space to allocate */
64194 nByte = sizeof(Mem) * nCol + ROUND8(sizeof(UnpackedRecord));
64195 pRec = (UnpackedRecord*)sqlite3DbMallocZero(db, nByte);
65140 int nByte = (p->nSub+1)*sizeof(SubProgram*);
65146 p->apSub = sqlite3DbReallocOrFree(v->db, p->apSub, nByte);
65397 int nByte = (p->nScan+1) * sizeof(ScanStatus);
65399 aNew = (ScanStatus*)sqlite3DbRealloc(p->db, p->aScan, nByte);
66215 int nByte = (nSub+1)*sizeof(SubProgram*);
66220 if( j==nSub && SQLITE_OK==sqlite3VdbeMemGrow(pSub, nByte, nSub!=0) ){
66349 ** nByte is the number of bytes of space needed.
66361 int nByte, /* Number of bytes to allocate */
66368 nByte = ROUND8(nByte);
66369 if( &(*ppFrom)[nByte] <= pEnd ){
66371 *ppFrom += nByte;
66373 *pnByte += nByte;
66449 int nByte; /* How much extra memory is needed */
66503 nByte = 0;
66504 p->aMem = allocSpace(p->aMem, nMem*sizeof(Mem), &zCsr, zEnd, &nByte);
66505 p->aVar = allocSpace(p->aVar, nVar*sizeof(Mem), &zCsr, zEnd, &nByte);
66506 p->apArg = allocSpace(p->apArg, nArg*sizeof(Mem*), &zCsr, zEnd, &nByte);
66507 p->azVar = allocSpace(p->azVar, nVar*sizeof(char*), &zCsr, zEnd, &nByte);
66509 &zCsr, zEnd, &nByte);
66510 p->aOnceFlag = allocSpace(p->aOnceFlag, nOnce, &zCsr, zEnd, &nByte);
66512 p->anExec = allocSpace(p->anExec, p->nOp*sizeof(i64), &zCsr, zEnd, &nByte);
66514 if( nByte ){
66515 p->pFree = sqlite3DbMallocZero(db, nByte);
66518 zEnd = &zCsr[nByte];
66519 }while( nByte && !db->mallocFailed );
67974 int nByte; /* Number of bytes required for *p */
67981 nByte = ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*(pKeyInfo->nField+1);
67982 if( nByte>szSpace+nOff ){
67983 p = (UnpackedRecord *)sqlite3DbMallocRaw(pKeyInfo->db, nByte);
69659 static SQLITE_NOINLINE void *createAggContext(sqlite3_context *p, int nByte){
69662 if( nByte<=0 ){
69666 sqlite3VdbeMemClearAndResize(pMem, nByte);
69670 memset(pMem->z, 0, nByte);
69681 SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context *p, int nByte){
69684 testcase( nByte<0 );
69686 return createAggContext(p, nByte);
70944 int nByte;
70946 nByte =
70955 if( SQLITE_OK==sqlite3VdbeMemClearAndResize(pMem, nByte) ){
72202 i64 nByte;
72215 nByte = pIn1->n + pIn2->n;
72216 if( nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){
72219 if( sqlite3VdbeMemGrow(pOut, (int)nByte+2, pOut==pIn2) ){
72227 pOut->z[nByte]=0;
72228 pOut->z[nByte+1] = 0;
72230 pOut->n = (int)nByte;
73436 i64 nByte; /* Data space required for this record */
73528 nByte = nHdr+nData;
73529 if( nByte+nZero>db->aLimit[SQLITE_LIMIT_LENGTH] ){
73538 if( sqlite3VdbeMemClearAndResize(pOut, (int)nByte) ){
73558 assert( j==nByte );
73561 pOut->n = (int)nByte;
76238 int nByte; /* Bytes of runtime space required for sub-program */
76284 nByte = ROUND8(sizeof(VdbeFrame))
76288 pFrame = sqlite3DbMallocZero(db, nByte);
77449 int nByte; /* Size of open blob, in bytes */
77500 p->nByte = sqlite3VdbeSerialTypeLen(type);
77803 if( n<0 || iOffset<0 || ((sqlite3_int64)iOffset+n)>p->nByte ){
77849 ** The Incrblob.nByte field is fixed for the lifetime of the Incrblob
77854 return (p && p->pStmt) ? p->nByte : 0;
78376 ** Read the next nByte bytes of data from the PMA p.
78386 int nByte, /* Bytes of data to read */
78394 p->iReadOff += nByte;
78423 if( nByte<=nAvail ){
78428 p->iReadOff += nByte;
78436 if( p->nAlloc<nByte ){
78439 while( nByte>nNew ) nNew = nNew*2;
78450 nRem = nByte - nAvail;
78464 memcpy(&p->aAlloc[nByte - nRem], aNext, nCopy);
78638 u64 nByte; /* Size of PMA in bytes */
78639 rc = vdbePmaReadVarint(pReadr, &nByte);
78640 pReadr->iEof = pReadr->iReadOff + nByte;
78641 *pnByte += nByte;
79064 int nByte; /* Total bytes of space to allocate */
79070 nByte = sizeof(MergeEngine) + N * (sizeof(int) + sizeof(PmaReader));
79072 pNew = sqlite3FaultSim(100) ? 0 : (MergeEngine*)sqlite3MallocZero(nByte);
79162 ** is guaranteed to be nByte bytes or smaller in size. This function
79163 ** attempts to extend the file to nByte bytes in size and to ensure that
79169 static void vdbeSorterExtendFile(sqlite3 *db, sqlite3_file *pFd, i64 nByte){
79170 if( nByte<=(i64)(db->nMaxSorterMmap) && pFd->pMethods->iVersion>=3 ){
79174 sqlite3OsFileControlHint(pFd, SQLITE_FCNTL_SIZE_HINT, &nByte);
79175 sqlite3OsFetch(pFd, 0, (int)nByte, &p);
79413 int nByte;
79415 nByte = sqlite3PutVarint(aByte, iVal);
79416 vdbePmaWriteBlob(p, aByte, nByte);
83618 int nByte = dupedExprStructSize(p, flags) & 0xfff;
83620 nByte += sqlite3Strlen30(p->u.zToken)+1;
83622 return ROUND8(nByte);
83639 int nByte = 0;
83641 nByte = dupedExprNodeSize(p, flags);
83643 nByte += dupedExprSize(p->pLeft, flags) + dupedExprSize(p->pRight, flags);
83646 return nByte;
83749 int nByte = sizeof(*p) + sizeof(p->a[0]) * (p->nCte-1);
83750 pRet = sqlite3DbMallocZero(db, nByte);
83826 int nByte;
83828 nByte = sizeof(*p) + (p->nSrc>0 ? sizeof(p->a[0]) * (p->nSrc-1) : 0);
83829 pNew = sqlite3DbMallocRaw(db, nByte );
89753 int nByte; /* Bytes of space required */
89774 nByte = sizeof(IndexSample) * nSample;
89775 nByte += sizeof(tRowcnt) * nIdxCol * 3 * nSample;
89776 nByte += nIdxCol * sizeof(tRowcnt); /* Space for Index.aAvgEq[] */
89778 pIdx->aSample = sqlite3DbMallocZero(db, nByte);
89790 assert( ((u8*)pSpace)-nByte==(u8*)(pIdx->aSample) );
92396 int nByte;
92399 nByte = (sizeof(char*) + sizeof(i16) + 1)*N;
92400 zExtra = sqlite3DbMallocZero(db, nByte);
93373 int nByte;
93398 nByte = sizeof(*pFKey) + (nCol-1)*sizeof(pFKey->aCol[0]) + pTo->n + 1;
93401 nByte += sqlite3Strlen30(pToCol->a[i].zName) + 1;
93404 pFKey = sqlite3DbMallocZero(db, nByte );
93597 int nByte; /* Bytes of space for Index object + arrays */
93599 nByte = ROUND8(sizeof(Index)) + /* Index structure */
93604 p = sqlite3DbMallocZero(db, nByte + nExtra);
93613 *ppExtra = ((char*)p) + nByte;
95064 int nByte = sizeof(*pWith) + (sizeof(pWith->a[1]) * pWith->nCte);
95065 pNew = sqlite3DbRealloc(db, pWith, nByte);
96815 ** Allocate nByte bytes of space using sqlite3Malloc(). If the
96818 ** If nByte is larger than the maximum string or blob length, then
96821 static void *contextMalloc(sqlite3_context *context, i64 nByte){
96824 assert( nByte>0 );
96825 testcase( nByte==db->aLimit[SQLITE_LIMIT_LENGTH] );
96826 testcase( nByte==db->aLimit[SQLITE_LIMIT_LENGTH]+1 );
96827 if( nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){
96831 z = sqlite3Malloc(nByte);
103021 u64 nByte = (wsdAutoext.nExt+1)*sizeof(wsdAutoext.aExt[0]);
103023 aNew = sqlite3_realloc64(wsdAutoext.aExt, nByte);
130425 u64 nByte = nUri+2; /* Bytes of space to allocate */
130431 for(iIn=0; iIn<nUri; iIn++) nByte += (zUri[iIn]=='&');
130432 zFile = sqlite3_malloc64(nByte);
134115 int nByte; /* Size of allocation used for *p */
134148 nByte = sizeof(const char *) * (argc-2);
134149 aCol = (const char **)sqlite3_malloc(nByte);
134151 memset((void*)aCol, 0, nByte);
134152 azNotindexed = (char **)sqlite3_malloc(nByte);
134155 memset(azNotindexed, 0, nByte);
134339 nByte = sizeof(Fts3Table) + /* Fts3Table */
134346 p = (Fts3Table*)sqlite3_malloc(nByte);
134351 memset(p, 0, nByte);
134397 assert( zCsr <= &((char *)p)[nByte] );
135775 int nByte = (pCsr->nSegment + 16)*sizeof(Fts3SegReader*);
135776 apNew = (Fts3SegReader **)sqlite3_realloc(pCsr->apSegment, nByte);
137537 int nByte = a[p->nToken-1].nList;
137538 char *aDoclist = sqlite3_malloc(nByte+1);
137540 memcpy(aDoclist, a[p->nToken-1].pList, nByte+1);
137741 sqlite3_int64 nByte = 0;
137753 a += sqlite3Fts3GetVarint(a, &nByte);
137755 if( nDoc==0 || nByte==0 ){
137761 pCsr->nRowAvg = (int)(((nByte / nDoc) + p->nPgsz) / p->nPgsz);
138957 int nByte; /* Bytes of space to allocate here */
138988 nByte = sizeof(Fts3auxTable) + sizeof(Fts3Table) + nDb + nFts3 + 2;
138989 p = (Fts3auxTable *)sqlite3_malloc(nByte);
138991 memset(p, 0, nByte);
139561 ** Allocate nByte bytes of memory using sqlite3_malloc(). If successful,
139565 static void *fts3MallocZero(int nByte){
139566 void *pRet = sqlite3_malloc(nByte);
139567 if( pRet ) memset(pRet, 0, nByte);
139641 int nByte; /* total space to allocate */
139645 nByte = sizeof(Fts3Expr) + sizeof(Fts3Phrase) + nToken;
139646 pRet = (Fts3Expr *)fts3MallocZero(nByte);
139756 int nByte = 0, iBegin = 0, iEnd = 0, iPos = 0;
139757 rc = pModule->xNext(pCursor, &zByte, &nByte, &iBegin, &iEnd, &iPos);
139764 zTemp = fts3ReallocOrFree(zTemp, nTemp + nByte);
139771 memcpy(&zTemp[nTemp], zByte, nByte);
139772 nTemp += nByte;
139774 pToken->n = nByte;
140067 int nByte = 0;
140069 rc = getNextNode(pParse, zIn, nIn, &p, &nByte);
140070 assert( nByte>0 || (rc!=SQLITE_OK && p==0) );
140157 assert( nByte>0 );
140159 assert( rc!=SQLITE_OK || (nByte>0 && nByte<=nIn) );
140160 nIn -= nByte;
140161 zIn += nByte;
142621 int nByte = 0;
142625 nByte += (int)(strlen(argv[i]) + 1);
142628 *pazDequote = azDequote = sqlite3_malloc(sizeof(char *)*argc + nByte);
142851 int nByte = sqlite3_value_bytes(apVal[0]);
142852 pCsr->zInput = sqlite3_malloc(nByte+1);
142856 memcpy(pCsr->zInput, zByte, nByte);
142857 pCsr->zInput[nByte] = 0;
142858 rc = pTab->pMod->xOpen(pTab->pTok, pCsr->zInput, nByte, &pCsr->pCsr);
144171 int nByte = sqlite3_blob_bytes(p->pSegments);
144172 *pnBlob = nByte;
144174 char *aByte = sqlite3_malloc(nByte + FTS3_NODE_PADDING);
144178 if( pnLoad && nByte>(FTS3_NODE_CHUNK_THRESHOLD) ){
144179 nByte = FTS3_NODE_CHUNKSIZE;
144180 *pnLoad = nByte;
144182 rc = sqlite3_blob_read(p->pSegments, aByte, nByte, 0);
144183 memset(&aByte[nByte], 0, FTS3_NODE_PADDING);
144229 static int fts3SegReaderRequire(Fts3SegReader *pReader, char *pFrom, int nByte){
144235 && (pFrom - pReader->aNode + nByte)>pReader->nPopulate
144688 int nByte = sizeof(Fts3SegReader) + (nElem+1)*sizeof(Fts3HashElem *);
144689 pReader = (Fts3SegReader *)sqlite3_malloc(nByte);
144693 memset(pReader, 0, nByte);
145872 int nByte;
145901 nByte = sqlite3Fts3VarintLen(iDelta) + (isRequirePos?nList+1:0);
145902 if( nDoclist+nByte>pCsr->nBuffer ){
145904 pCsr->nBuffer = (nDoclist+nByte)*2;
146004 ** A segment of size nByte bytes has just been written to absolute level
146010 sqlite3_int64 nByte /* Size of new segment at iAbsLevel */
146020 i64 nLimit = (nByte*3)/2;
146460 int nByte = sizeof(u32) * (p->nColumn+1)*3;
146461 aSz = (u32 *)sqlite3_malloc(nByte);
146465 memset(aSz, 0, nByte);
146527 int nByte; /* Bytes allocated at pCsr->apSegment[] */
146531 nByte = sizeof(Fts3SegReader *) * nSeg;
146532 pCsr->apSegment = (Fts3SegReader **)sqlite3_malloc(nByte);
146537 memset(pCsr->apSegment, 0, nByte);
149039 int nByte; /* Number of bytes of space to allocate */
149056 nByte = sizeof(SnippetPhrase) * nList;
149057 sIter.aPhrase = (SnippetPhrase *)sqlite3_malloc(nByte);
149061 memset(sIter.aPhrase, 0, nByte);
151586 int nByte = (NCELL(pNode) - iCell - 1) * pRtree->nBytesPerCell;
151587 memmove(pDst, pSrc, nByte);
153081 int nByte = (pRtree->nDim+1)*(sizeof(int*)+nCell*sizeof(int));
153083 aaSorted = (int **)sqlite3_malloc(nByte);
153089 memset(aaSorted, 0, nByte);
155141 int nByte = 0;
155166 if( nByte ){
155167 char *zNew = sqlite3_realloc(pCsr->zBuffer, nByte);
155172 pCsr->nBuffer = nByte;
155176 pCsr->zBuffer, pCsr->nBuffer, &nByte, /* Output vars */
155180 } while( nByte>pCsr->nBuffer );
155183 *pnBytes = nByte;