• Home
  • Raw
  • Download

Lines Matching refs:nByte

1335   void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg);
1338 int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut);
1777 #define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */
2889 ** ^If the nByte argument is less than zero, then zSql is read up to the
2890 ** first zero terminator. ^If nByte is non-negative, then it is the maximum
2891 ** number of bytes read from zSql. ^When nByte is non-negative, the
2893 ** the nByte-th byte, whichever comes first. If the caller knows
2895 ** performance advantage to be gained by passing an nByte parameter that
2956 int nByte, /* Maximum length of zSql in bytes. */
2963 int nByte, /* Maximum length of zSql in bytes. */
2970 int nByte, /* Maximum length of zSql in bytes. */
2977 int nByte, /* Maximum length of zSql in bytes. */
8974 u8 nByte; /* Size in byte of text or blob. */
10313 SQLITE_PRIVATE int sqlite3Utf8CharLen(const char *pData, int nByte);
12193 SQLITE_PRIVATE void sqlite3OsDlError(sqlite3_vfs *pVfs, int nByte, char *zBufOut){
12194 pVfs->xDlError(pVfs, nByte, zBufOut);
12203 SQLITE_PRIVATE int sqlite3OsRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){
12204 return pVfs->xRandomness(pVfs, nByte, zBufOut);
12464 static void *sqlite3MemMalloc(int nByte){ return 0; }
12466 static void *sqlite3MemRealloc(void *pPrior, int nByte){ return 0; }
12527 ** For this low-level routine, we are guaranteed that nByte>0 because
12528 ** cases of nByte<=0 will be intercepted and dealt with by higher level
12531 static void *sqlite3MemMalloc(int nByte){
12533 assert( nByte>0 );
12534 nByte = ROUND8(nByte);
12535 p = malloc( nByte+8 );
12537 p[0] = nByte;
12541 sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes of memory", nByte);
12579 ** redirected to xMalloc. Similarly, we know that nByte>0 becauses
12580 ** cases where nByte<=0 will have been intercepted by higher-level
12583 static void *sqlite3MemRealloc(void *pPrior, int nByte){
12585 assert( pPrior!=0 && nByte>0 );
12586 nByte = ROUND8(nByte);
12589 p = realloc(p, nByte+8 );
12591 p[0] = nByte;
12597 sqlite3MemSize(pPrior), nByte);
12864 static void randomFill(char *pBuf, int nByte){
12867 y = nByte | 1;
12868 while( nByte >= 4 ){
12874 nByte -= 4;
12876 while( nByte-- > 0 ){
12885 ** Allocate nByte bytes of memory.
12887 static void *sqlite3MemMalloc(int nByte){
12897 nReserve = ROUND8(nByte);
12922 mem.xBacktrace(nByte, pHdr->nBacktrace-1, &aAddr[1]);
12930 pHdr->iSize = nByte;
12931 adjustStats(nByte, +1);
12934 randomFill((char*)pInt, nByte);
12935 memset(((char*)pInt)+nByte, 0x65, nReserve-nByte);
12986 static void *sqlite3MemRealloc(void *pPrior, int nByte){
12991 pNew = sqlite3MemMalloc(nByte);
12993 memcpy(pNew, pPrior, nByte<pOldHdr->iSize ? nByte : pOldHdr->iSize);
12994 if( nByte>pOldHdr->iSize ){
12995 randomFill(&((char*)pNew)[pOldHdr->iSize], nByte - pOldHdr->iSize);
13351 static void memsys3OutOfMemory(int nByte){
13356 sqlite3_release_memory(nByte);
13470 static void *memsys3MallocUnsafe(int nByte){
13477 if( nByte<=12 ){
13480 nBlock = (nByte + 11)/8;
14040 ** The caller guarantees that nByte positive.
14046 static void *memsys5MallocUnsafe(int nByte){
14052 /* nByte must be a positive */
14053 assert( nByte>0 );
14057 if( (u32)nByte>mem5.maxRequest ){
14058 mem5.maxRequest = nByte;
14064 if( nByte > 0x40000000 ){
14068 /* Round nByte up to the next valid power of two */
14069 for(iFullSz=mem5.szAtom, iLogsize=0; iFullSz<nByte; iFullSz *= 2, iLogsize++){}
14078 sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes", nByte);
14095 mem5.totalExcess += iFullSz - nByte;
14262 int nByte; /* Number of bytes of memory available to this allocator */
14277 nByte = sqlite3GlobalConfig.nHeap;
14287 mem5.nBlock = (nByte / (mem5.szAtom+sizeof(u8)));
15824 static void sqlite3MallocAlarm(int nByte){
15834 xCallback(pArg, nowUsed, nByte);
18275 ** pZ is a UTF-8 encoded unicode string. If nByte is less than zero,
18277 ** the first 0x00 byte. If nByte is not less than zero, return the
18278 ** number of unicode characters in the first nByte of pZ (or up to
18281 SQLITE_PRIVATE int sqlite3Utf8CharLen(const char *zIn, int nByte){
18285 if( nByte>=0 ){
18286 zTerm = &z[nByte];
18335 SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *db, const void *z, int nByte){
18339 sqlite3VdbeMemSetStr(&m, z, nByte, SQLITE_UTF16NATIVE, SQLITE_STATIC);
20327 static int os2Truncate( sqlite3_file *id, i64 nByte ){
20330 OSTRACE3( "TRUNCATE %d %lld\n", pFile->h, nByte );
20332 rc = DosSetFileSize( pFile->h, nByte );
24611 static int unixTruncate(sqlite3_file *id, i64 nByte){
24615 rc = ftruncate(((unixFile*)id)->h, (off_t)nByte);
24628 if( ((unixFile*)id)->inNormalWrite && nByte==0 ){
27503 int nByte;
27506 nByte = WideCharToMultiByte(CP_UTF8, 0, zWideFilename, -1, 0, 0, 0, 0);
27507 zFilename = malloc( nByte );
27511 nByte = WideCharToMultiByte(CP_UTF8, 0, zWideFilename, -1, zFilename, nByte,
27513 if( nByte == 0 ){
27528 int nByte;
27532 nByte = MultiByteToWideChar(codepage, 0, zFilename, -1, NULL,0)*sizeof(WCHAR);
27533 zMbcsFilename = malloc( nByte*sizeof(zMbcsFilename[0]) );
27537 nByte = MultiByteToWideChar(codepage, 0, zFilename, -1, zMbcsFilename, nByte);
27538 if( nByte==0 ){
27553 int nByte;
27557 nByte = WideCharToMultiByte(codepage, 0, zWideFilename, -1, 0, 0, 0, 0);
27558 zFilename = malloc( nByte );
27562 nByte = WideCharToMultiByte(codepage, 0, zWideFilename, -1, zFilename, nByte,
27564 if( nByte == 0 ){
28057 static int winTruncate(sqlite3_file *id, sqlite3_int64 nByte){
28058 LONG upperBits = (LONG)((nByte>>32) & 0x7fffffff);
28059 LONG lowerBits = (LONG)(nByte & 0xffffffff);
28065 OSTRACE3("TRUNCATE %d %lld\n", pFile->h, nByte);
28072 /* SetEndOfFile will fail if nByte is negative */
28891 int nByte;
28898 nByte = GetFullPathNameW((WCHAR*)zConverted, 0, 0, 0) + 3;
28899 zTemp = malloc( nByte*sizeof(zTemp[0]) );
28904 GetFullPathNameW((WCHAR*)zConverted, nByte, zTemp, 0);
28915 nByte = GetFullPathNameA((char*)zConverted, 0, 0, 0) + 3;
28916 zTemp = malloc( nByte*sizeof(zTemp[0]) );
28921 GetFullPathNameA((char*)zConverted, nByte, zTemp, 0);
29866 int nByte;
29867 nByte = pCache->szPage + pCache->szExtra + sizeof(PgHdr);
29868 p = sqlite3GlobalConfig.pcache.xCreate(nByte, pCache->bPurgeable);
30378 static void *pcache1Alloc(int nByte){
30381 if( nByte<=pcache1.szSlot && pcache1.pFree ){
30385 sqlite3StatusSet(SQLITE_STATUS_PAGECACHE_SIZE, nByte);
30396 p = sqlite3Malloc(nByte);
30429 int nByte = sizeof(PgHdr1) + pCache->szPage;
30430 void *pPg = pcache1Alloc(nByte);
31972 static u32 pager_datahash(int nByte, unsigned char *pData){
31975 for(i=0; i<nByte; i++){
38905 ** Allocate nByte bytes of space from within the B-Tree page passed
38917 static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
38929 assert( nByte>=0 ); /* Minimum cell size is 4 */
38930 assert( pPage->nFree>=nByte );
38933 assert( nByte < usableSize-8 );
38961 if( size>=nByte ){
38962 int x = size - nByte;
38986 testcase( gap+2+nByte==top );
38987 if( gap+2+nByte>top ){
38991 assert( gap+nByte<=top );
39001 top -= nByte;
39003 assert( top+nByte <= pPage->pBt->usableSize );
41398 ** If argument eOp is false, then nByte bytes of data are copied
41400 ** then sqlite3PagerWrite() is called on pDbPage and nByte bytes
41408 int nByte, /* Number of bytes to copy */
41418 memcpy(pPayload, pBuf, nByte);
41421 memcpy(pBuf, pPayload, nByte);
46457 int nByte;
46462 /* Set nByte to the number of bytes required to store the expanded blob. */
46463 nByte = pMem->n + pMem->u.nZero;
46464 if( nByte<=0 ){
46465 nByte = 1;
46467 if( sqlite3VdbeMemGrow(pMem, nByte, 1) ){
46513 const int nByte = 32;
46523 if( sqlite3VdbeMemGrow(pMem, nByte, 0) ){
46534 sqlite3_snprintf(nByte, pMem->z, "%lld", pMem->u.i);
46537 sqlite3_snprintf(nByte, pMem->z, "%!.15g", pMem->r);
46979 int nByte = n; /* New value for pMem->n */
46998 if( nByte<0 ){
47001 for(nByte=0; nByte<=iLimit && z[nByte]; nByte++){}
47003 for(nByte=0; nByte<=iLimit && (z[nByte] | z[nByte+1]); nByte+=2){}
47013 int nAlloc = nByte;
47017 if( nByte>iLimit ){
47035 pMem->n = nByte;
47046 if( nByte>iLimit ){
47728 int nByte = (p->nSub+1)*sizeof(SubProgram*);
47734 p->apSub = sqlite3DbReallocOrFree(v->db, p->apSub, nByte);
48150 int nField, nByte;
48153 nByte = sizeof(*pKeyInfo) + (nField-1)*sizeof(pKeyInfo->aColl[0]) + nField;
48154 pKeyInfo = sqlite3Malloc( nByte );
48158 memcpy(pKeyInfo, zP4, nByte);
48569 int nByte = (nSub+1)*sizeof(SubProgram*);
48574 if( j==nSub && SQLITE_OK==sqlite3VdbeMemGrow(pSub, nByte, 1) ){
48709 ** nByte is the number of bytes of space needed.
48721 int nByte, /* Number of bytes to allocate */
48728 nByte = ROUND8(nByte);
48729 if( &(*ppFrom)[nByte] <= pEnd ){
48731 *ppFrom += nByte;
48733 *pnByte += nByte;
48796 int nByte; /* How much extra memory needed */
48818 nByte = 0;
48819 p->aMem = allocSpace(p->aMem, nMem*sizeof(Mem), &zCsr, zEnd, &nByte);
48820 p->aVar = allocSpace(p->aVar, nVar*sizeof(Mem), &zCsr, zEnd, &nByte);
48821 p->apArg = allocSpace(p->apArg, nArg*sizeof(Mem*), &zCsr, zEnd, &nByte);
48822 p->azVar = allocSpace(p->azVar, nVar*sizeof(char*), &zCsr, zEnd, &nByte);
48824 &zCsr, zEnd, &nByte);
48825 if( nByte ){
48826 p->pFree = sqlite3DbMallocZero(db, nByte);
48829 zEnd = &zCsr[nByte];
48830 }while( nByte && !db->mallocFailed );
50129 int nByte; /* Memory space needed to hold p, in bytes */
50145 nByte = ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*(pKeyInfo->nField+1);
50146 if( nByte>szSpace ){
50147 p = sqlite3DbMallocRaw(pKeyInfo->db, nByte);
51031 SQLITE_API void *sqlite3_aggregate_context(sqlite3_context *p, int nByte){
51036 testcase( nByte<0 );
51038 if( nByte<=0 ){
51043 sqlite3VdbeMemGrow(pMem, nByte, 0);
51047 memset(pMem->z, 0, nByte);
52128 int nByte;
52130 nByte =
52140 if( SQLITE_OK==sqlite3VdbeMemGrow(pMem, nByte, 0) ){
52605 i64 nByte;
52679 i64 nByte; /* Data space required for this record */
52887 int nByte; /* Bytes of runtime space required for sub-program */
53585 i64 nByte;
53599 u.ae.nByte = pIn1->n + pIn2->n;
53600 if( u.ae.nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){
53604 if( sqlite3VdbeMemGrow(pOut, (int)u.ae.nByte+2, pOut==pIn2) ){
53611 pOut->z[u.ae.nByte] = 0;
53612 pOut->z[u.ae.nByte+1] = 0;
53614 pOut->n = (int)u.ae.nByte;
54808 i64 nByte; /* Data space required for this record */
54838 u.ao.nByte = 0; /* Data space required for this record */
54876 u.ao.nByte = u.ao.nHdr+u.ao.nData-u.ao.nZero;
54877 if( u.ao.nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){
54888 if( sqlite3VdbeMemGrow(pOut, (int)u.ao.nByte, 0) ){
54900 …u.ao.i += sqlite3VdbeSerialPut(&u.ao.zNewRecord[u.ao.i], (int)(u.ao.nByte-u.ao.i), u.ao.pRec,u.ao.…
54902 assert( u.ao.i==u.ao.nByte );
54905 pOut->n = (int)u.ao.nByte;
57335 int nByte; /* Bytes of runtime space required for sub-program */
57382 u.by.nByte = ROUND8(sizeof(VdbeFrame))
57385 u.by.pFrame = sqlite3DbMallocZero(db, u.by.nByte);
58314 int nByte; /* Size of open blob, in bytes */
58550 pBlob->nByte = sqlite3VdbeSerialTypeLen(type);
58613 if( n<0 || iOffset<0 || (iOffset+n)>p->nByte ){
58660 ** The Incrblob.nByte field is fixed for the lifetime of the Incrblob
58665 return p ? p->nByte : 0;
61199 int nByte = dupedExprStructSize(p, flags) & 0xfff;
61201 nByte += sqlite3Strlen30(p->u.zToken)+1;
61203 return ROUND8(nByte);
61220 int nByte = 0;
61222 nByte = dupedExprNodeSize(p, flags);
61224 nByte += dupedExprSize(p->pLeft, flags) + dupedExprSize(p->pRight, flags);
61227 return nByte;
61381 int nByte;
61383 nByte = sizeof(*p) + (p->nSrc>0 ? sizeof(p->a[0]) * (p->nSrc-1) : 0);
61384 pNew = sqlite3DbMallocRaw(db, nByte );
65655 pSample->nByte = (u8)n;
68627 int nByte;
68652 nByte = sizeof(*pFKey) + (nCol-1)*sizeof(pFKey->aCol[0]) + pTo->n + 1;
68655 nByte += sqlite3Strlen30(pToCol->a[i].zName) + 1;
68658 pFKey = sqlite3DbMallocZero(db, nByte );
71550 ** Allocate nByte bytes of space using sqlite3_malloc(). If the
71553 ** If nByte is larger than the maximum string or blob length, then
71556 static void *contextMalloc(sqlite3_context *context, i64 nByte){
71559 assert( nByte>0 );
71560 testcase( nByte==db->aLimit[SQLITE_LIMIT_LENGTH] );
71561 testcase( nByte==db->aLimit[SQLITE_LIMIT_LENGTH]+1 );
71562 if( nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){
71566 z = sqlite3Malloc((int)nByte);
76863 int nByte = (wsdAutoext.nExt+1)*sizeof(wsdAutoext.aExt[0]);
76865 aNew = sqlite3_realloc(wsdAutoext.aExt, nByte);
88746 db, pColl->enc, aSample[i].u.z, aSample[i].nByte, &nSample
88757 r = pColl->xCmp(pColl->pUser, aSample[i].nByte, aSample[i].u.z, n, z);
99271 int nByte; /* Size of allocation used for *p */
99308 nByte = sizeof(Fts3Table) + /* Fts3Table */
99313 p = (Fts3Table*)sqlite3_malloc(nByte);
99318 memset(p, 0, nByte);
99351 assert( zCsr <= &((char *)p)[nByte] );
101303 int nByte; /* total space to allocate */
101309 nByte = sizeof(Fts3Expr) + sizeof(Fts3Phrase) + nToken;
101310 pRet = (Fts3Expr *)sqlite3_malloc(nByte);
101314 memset(pRet, 0, nByte);
101389 int nByte = sizeof(Fts3Expr) + sizeof(Fts3Phrase);
101390 p = fts3ReallocOrFree(p, nByte+ii*sizeof(struct PhraseToken));
101396 memset(p, 0, nByte);
101420 int nByte = sizeof(Fts3Expr) + sizeof(Fts3Phrase);
101421 nByte += (p?(p->pPhrase->nToken-1):0) * sizeof(struct PhraseToken);
101422 p = fts3ReallocOrFree(p, nByte + nTemp);
101427 zNew = &(((char *)p)[nByte]);
101430 memset(p, 0, nByte+nTemp);
101710 int nByte = 0;
101711 rc = getNextNode(pParse, zIn, nIn, &p, &nByte);
101796 assert( nByte>0 );
101798 assert( rc!=SQLITE_OK || (nByte>0 && nByte<=nIn) );
101799 nIn -= nByte;
101800 zIn += nByte;
104868 int nByte = sizeof(Fts3SegReader) + (nElem+1)*sizeof(Fts3HashElem *);
104869 pReader = (Fts3SegReader *)sqlite3_malloc(nByte);
104873 memset(pReader, 0, nByte);
105811 int nByte;
105828 nByte = sqlite3Fts3VarintLen(iDocid-iPrev) + (isRequirePos?nList+1:0);
105829 if( nDoclist+nByte>nAlloc ){
105831 nAlloc = nDoclist+nByte*2;
106190 short int nByte; /* Number of bytes in the term */
106298 int iStart, int nByte /* Offset and size of the match */
106320 pMatch->nByte = (short)nByte;
106675 pMatch->iCol, pMatch->iTerm, pMatch->iStart, pMatch->nByte);
106709 while( i<nMatch && aMatch[i].iStart+aMatch[i].nByte<iBreak ){ i++; }
106714 if( i>0 && aMatch[i-1].iStart+aMatch[i-1].nByte>=iBreak ){
106805 iEnd = aMatch[i].iStart + aMatch[i].nByte + 40;
106824 fts3SnippetAppend(&sb, &zDoc[iStart], aMatch[iMatch].nByte);
106826 iStart += aMatch[iMatch].nByte;
107971 int nByte = (NCELL(pNode) - iCell - 1) * pRtree->nBytesPerCell;
107972 memmove(pDst, pSrc, nByte);
109257 int nByte = (pRtree->nDim+1)*(sizeof(int*)+nCell*sizeof(int));
109259 aaSorted = (int **)sqlite3_malloc(nByte);
109265 memset(aaSorted, 0, nByte);
111048 int nByte = 0;
111073 if( nByte ){
111074 char *zNew = sqlite3_realloc(pCsr->zBuffer, nByte);
111079 pCsr->nBuffer = nByte;
111083 pCsr->zBuffer, pCsr->nBuffer, &nByte, /* Output vars */
111087 } while( nByte>pCsr->nBuffer );
111090 *pnBytes = nByte;