Lines Matching refs:nByte

2036   int nByte = sqlite3_value_bytes(argv[0]);
2051 SHA3Update(&cx, sqlite3_value_blob(argv[0]), nByte);
2053 SHA3Update(&cx, sqlite3_value_text(argv[0]), nByte);
5328 sqlite3_int64 nByte = nNew*sizeof(FsdirLevel);
5329 FsdirLevel *aNew = (FsdirLevel*)sqlite3_realloc64(pCur->aLvl, nByte);
6331 static void apndDlError(sqlite3_vfs*, int nByte, char *zErrMsg);
6334 static int apndRandomness(sqlite3_vfs*, int nByte, char *zOut);
6766 static void apndDlError(sqlite3_vfs *pVfs, int nByte, char *zErrMsg){
6767 ORIGVFS(pVfs)->xDlError(ORIGVFS(pVfs), nByte, zErrMsg);
6775 static int apndRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){
6776 return ORIGVFS(pVfs)->xRandomness(ORIGVFS(pVfs), nByte, zBufOut);
7193 int nByte = sizeof(ZipfileTab) + ZIPFILE_BUFFER_SIZE;
7221 pNew = (ZipfileTab*)sqlite3_malloc64((sqlite3_int64)nByte+nFile);
7223 memset(pNew, 0, nByte+nFile);
7533 u16 nByte = zipfileRead16(p);
7546 p += nByte;
8766 static int zipfileBufferGrow(ZipfileBuffer *pBuf, int nByte){
8767 if( pBuf->n+nByte>pBuf->nAlloc ){
8770 int nReq = pBuf->n + nByte;
8815 int nByte;
8929 nByte = ZIPFILE_LFH_FIXED_SZ + e.cds.nFile + 9;
8930 if( (rc = zipfileBufferGrow(&p->body, nByte)) ) goto zipfile_step_out;
8941 nByte = ZIPFILE_CDS_FIXED_SZ + e.cds.nFile + 9;
8942 if( (rc = zipfileBufferGrow(&p->cds, nByte)) ) goto zipfile_step_out;
9529 ** Allocate and return nByte bytes of zeroed memory using sqlite3_malloc().
9532 static void *idxMalloc(int *pRc, int nByte){
9535 assert( nByte>0 );
9536 pRet = sqlite3_malloc(nByte);
9538 memset(pRet, 0, nByte);
10058 int nByte;
10067 nByte = sizeof(IdxTable) + nTab + 1;
10076 nByte += 1 + STRLEN(zCol);
10081 nByte += 1 + STRLEN(zColSeq);
10088 nByte += sizeof(IdxColumn) * nCol;
10090 pNew = idxMalloc(&rc, nByte);
10852 int nByte; /* Bytes of space allocated at z */
10913 int nByte = sqlite3_value_bytes(argv[1]);
10915 if( nByte>pSlot->nByte ){
10916 char *zNew = (char*)sqlite3_realloc(pSlot->z, nByte*2);
10921 pSlot->nByte = nByte*2;
10924 pSlot->n = nByte;
10927 if( pData ) memcpy(pSlot->z, pData, nByte);
10930 memcpy(pSlot->z, pData, nByte);
11110 int nByte = sizeof(struct IdxRemCtx) + (sizeof(struct IdxRemSlot) * nMax);
11111 pCtx = (struct IdxRemCtx*)idxMalloc(&rc, nByte);
12936 ** Otherwise, an attempt is made to allocate, zero and return a buffer nByte
12941 static void *recoverMalloc(sqlite3_recover *p, i64 nByte){
12943 assert( nByte>0 );
12945 pRet = sqlite3_malloc64(nByte);
12947 memset(pRet, 0, nByte);
12997 int nByte = sizeof(RecoverBitmap) + nElem*sizeof(u32);
12998 RecoverBitmap *pRet = (RecoverBitmap*)recoverMalloc(p, nByte);
13661 int nByte = 0;
13664 nByte += (sqlite3_column_bytes(pStmt, 1)+1);
13666 nByte += sizeof(RecoverTable) + nCol*sizeof(RecoverColumn) + nName+1;
13669 pNew = recoverMalloc(p, nByte);
14268 int nByte = 0;
14278 nByte = sizeof(sqlite3_value*) * (p1->nMax+1);
14279 p1->apVal = (sqlite3_value**)recoverMalloc(p, nByte);
14711 int nByte = 0;
14714 nByte = recoverGetU16(&a[iFree+2]);
14715 if( iFree+nByte>n ) return 0;
14716 if( iNext && iNext<iFree+nByte ) return 0;
14717 memset(&aUsed[iFree], 0xFF, nByte);
14731 int nByte = 0;
14736 if( eType==0x05 || eType==0x02 ) nByte += 4;
14737 nByte += recoverGetVarint(&a[iOff+nByte], &nPayload);
14740 nByte += recoverGetVarint(&a[iOff+nByte], &dummy);
14748 nByte += nPayload;
14750 nByte += K+4;
14752 nByte += M+4;
14756 if( iOff+nByte>n ){
14759 for(iByte=iOff; iByte<(iOff+nByte); iByte++){
14878 int nByte = (nSz>=((iBlk+1)*nMax)) ? nMax : (nSz % nMax);
14880 rc = pFd->pMethods->xRead(pFd, aPg, nByte, iBlk*nMax);
14911 static int recoverVfsRead(sqlite3_file *pFd, void *aBuf, int nByte, i64 iOff){
14915 rc = pFd->pMethods->xRead(pFd, aBuf, nByte, iOff);
14916 if( nByte==16 ){
14919 if( rc==SQLITE_OK && iOff==0 && nByte>=108 ){
14990 p->pgsz = nByte;
14991 p->pPage1Cache = (u8*)recoverMalloc(p, nByte*2);
14993 p->pPage1Disk = &p->pPage1Cache[nByte];
14994 memcpy(p->pPage1Disk, aBuf, nByte);
15007 memset(&((u8*)aBuf)[sizeof(aHdr)], 0, nByte-sizeof(aHdr));
15009 memcpy(p->pPage1Cache, aBuf, nByte);
15017 rc = pFd->pMethods->xRead(pFd, aBuf, nByte, iOff);
15043 sqlite3_file *pFd, const void *aBuf, int nByte, i64 iOff
15046 pFd->pMethods->xWrite(pFd, aBuf, nByte, iOff)
15303 int nByte = 0;
15310 nByte = sizeof(sqlite3_recover) + nDb+1 + nUri+1;
15311 pRet = (sqlite3_recover*)sqlite3_malloc(nByte);
15313 memset(pRet, 0, nByte);
22790 int nByte; /* Number of bytes in an SQL string */
22942 nByte = strlen30(zSql);
22995 zSql = sqlite3_malloc64( nByte*2 + 20 + nCol*2 );
23000 sqlite3_snprintf(nByte+20, zSql, "INSERT INTO %s VALUES(?", zFullTabName);
24199 int ii, nByte;
24206 nByte = sizeof(pSession->azFilter[0])*(nCmd-1);
24207 pSession->azFilter = sqlite3_malloc( nByte );