Home
last modified time | relevance | path

Searched refs:nByte (Results 1 – 25 of 144) sorted by relevance

123456

/sqlite-3.40.0/src/
H A Dmem1.c131 testcase( ROUND8(nByte)==nByte ); in sqlite3MemMalloc()
132 p = SQLITE_MALLOC( nByte ); in sqlite3MemMalloc()
140 assert( nByte>0 ); in sqlite3MemMalloc()
141 testcase( ROUND8(nByte)!=nByte ); in sqlite3MemMalloc()
142 p = SQLITE_MALLOC( nByte+8 ); in sqlite3MemMalloc()
144 p[0] = nByte; in sqlite3MemMalloc()
212 assert( pPrior!=0 && nByte>0 ); in sqlite3MemRealloc()
213 assert( nByte==ROUND8(nByte) ); /* EV: R-46199-30249 */ in sqlite3MemRealloc()
215 p = SQLITE_REALLOC(p, nByte+8 ); in sqlite3MemRealloc()
217 p[0] = nByte; in sqlite3MemRealloc()
[all …]
H A Dmem2.c222 y = nByte | 1; in randomFill()
223 while( nByte >= 4 ){ in randomFill()
229 nByte -= 4; in randomFill()
231 while( nByte-- > 0 ){ in randomFill()
252 nReserve = ROUND8(nByte); in sqlite3MemMalloc()
286 pHdr->iSize = nByte; in sqlite3MemMalloc()
287 adjustStats(nByte, +1); in sqlite3MemMalloc()
291 memset(((char*)pInt)+nByte, 0x65, nReserve-nByte); in sqlite3MemMalloc()
349 pNew = sqlite3MemMalloc(nByte); in sqlite3MemRealloc()
351 memcpy(pNew, pPrior, (int)(nByte<pOldHdr->iSize ? nByte : pOldHdr->iSize)); in sqlite3MemRealloc()
[all …]
H A Dstatus.c270 int nByte = sqlite3PagerMemUsed(pPager); in sqlite3_db_status() local
272 nByte = nByte / sqlite3BtreeConnectionCount(pBt); in sqlite3_db_status()
274 totalUsed += nByte; in sqlite3_db_status()
293 db->pnBytesFreed = &nByte; in sqlite3_db_status()
307 nByte += sqlite3_msize(pSchema->tblHash.ht); in sqlite3_db_status()
308 nByte += sqlite3_msize(pSchema->trigHash.ht); in sqlite3_db_status()
309 nByte += sqlite3_msize(pSchema->idxHash.ht); in sqlite3_db_status()
310 nByte += sqlite3_msize(pSchema->fkeyHash.ht); in sqlite3_db_status()
325 *pCurrent = nByte; in sqlite3_db_status()
338 db->pnBytesFreed = &nByte; in sqlite3_db_status()
[all …]
H A Dtest_blob.c188 int nByte; in test_blob_bytes() local
196 nByte = sqlite3_blob_bytes(pBlob); in test_blob_bytes()
197 Tcl_SetObjResult(interp, Tcl_NewIntObj(nByte)); in test_blob_bytes()
224 int nByte; in test_blob_read() local
236 || TCL_OK!=Tcl_GetIntFromObj(interp, objv[3], &nByte) in test_blob_read()
241 if( nByte>0 ){ in test_blob_read()
242 zBuf = (unsigned char *)Tcl_AttemptAlloc(nByte); in test_blob_read()
248 rc = sqlite3_blob_read(pBlob, zBuf, nByte, iOffset); in test_blob_read()
250 Tcl_SetObjResult(interp, Tcl_NewByteArrayObj(zBuf, nByte)); in test_blob_read()
H A Dmem5.c220 static void *memsys5MallocUnsafe(int nByte){ in memsys5MallocUnsafe() argument
227 assert( nByte>0 ); in memsys5MallocUnsafe()
230 if( nByte > 0x40000000 ) return 0; in memsys5MallocUnsafe()
235 if( (u32)nByte>mem5.maxRequest ){ in memsys5MallocUnsafe()
236 mem5.maxRequest = nByte; in memsys5MallocUnsafe()
242 for(iFullSz=mem5.szAtom,iLogsize=0; iFullSz<nByte; iFullSz*=2,iLogsize++){} in memsys5MallocUnsafe()
251 sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes", nByte); in memsys5MallocUnsafe()
270 mem5.totalExcess += iFullSz - nByte; in memsys5MallocUnsafe()
457 int nByte; /* Number of bytes of memory available to this allocator */ in memsys5Init() local
472 nByte = sqlite3GlobalConfig.nHeap; in memsys5Init()
[all …]
H A Dtest_malloc.c304 int nByte; in test_malloc() local
312 p = sqlite3_malloc((unsigned)nByte); in test_malloc()
329 int nByte; in test_realloc() local
341 p = sqlite3_realloc(pPrior, (unsigned)nByte); in test_realloc()
738 int nByte; member
767 pLog->nByte += nByte; in test_memdebug_callback()
843 apElem[1] = Tcl_NewIntObj(pLog->nByte); in test_memdebug_log()
1080 if( nByte==0 ){ in test_config_heap()
1085 zBuf = realloc(zBuf, nByte); in test_config_heap()
1102 int nByte; /* Size to pass to sqlite3_config() */ in test_config_heap_size() local
[all …]
H A Dtest_vfs.c671 int nByte; in tvfsOpen() local
674 nByte = sizeof(sqlite3_io_methods); in tvfsOpen()
680 memcpy(pMethods, &tvfs_io_methods, nByte); in tvfsOpen()
862 pBuffer = (TestvfsBuffer *)ckalloc(nByte); in tvfsShmOpen()
863 memset(pBuffer, 0, nByte); in tvfsShmOpen()
1155 int nByte = pgsz; in testvfs_obj_cmd() local
1158 nByte = n; in testvfs_obj_cmd()
1239 int nByte; in testvfs_obj_cmd() local
1245 if( nByte>0 ){ in testvfs_obj_cmd()
1538 p = (Testvfs *)ckalloc(nByte); in testvfs_cmd()
[all …]
H A Dvdbemem.c364 int nByte; in sqlite3VdbeMemExpandBlob() local
374 if( nByte<=0 ){ in sqlite3VdbeMemExpandBlob()
376 nByte = 1; in sqlite3VdbeMemExpandBlob()
421 const int nByte = 32; in sqlite3VdbeMemStringify() local
894 int nByte = n>0?n:1; in sqlite3VdbeMemSetZeroBlob() local
900 memset(pMem->z, 0, nByte); in sqlite3VdbeMemSetZeroBlob()
1164 if( nByte<0 ){ in sqlite3VdbeMemSetStr()
1167 nByte = strlen(z); in sqlite3VdbeMemSetStr()
1169 for(nByte=0; nByte<=iLimit && (z[nByte] | z[nByte+1]); nByte+=2){} in sqlite3VdbeMemSetStr()
1178 if( nByte>iLimit ){ in sqlite3VdbeMemSetStr()
[all …]
H A Dtest_osinst.c570 REALVFS(pVfs)->xDlError(REALVFS(pVfs), nByte, zErrMsg); in vfslogDlError()
717 int nByte; in sqlite3_vfslog_new() local
730 p = (VfslogVfs *)sqlite3_malloc(nByte); in sqlite3_vfslog_new()
731 memset(p, 0, nByte); in sqlite3_vfslog_new()
813 sqlite3_int64 nByte; /* Size of file in bytes */ member
874 int nByte; in vlogConnect() local
880 p = sqlite3_malloc(nByte); in vlogConnect()
882 memset(p, 0, nByte); in vlogConnect()
900 p->pFd->pMethods->xFileSize(p->pFd, &p->nByte); in vlogConnect()
975 if( pCsr->iOffset+nRead<=p->nByte ){ in vlogNext()
[all …]
/sqlite-3.40.0/ext/lsm1/lsm-test/
H A Dlsmtest_mem.c68 int nByte; member
112 nReq = BLOCK_HDR_SIZE + nByte + 4; in tmMalloc()
131 pNew->nByte = nByte; in tmMalloc()
140 memset(pUser, 0x56, nByte); in tmMalloc()
168 pAgg->nByte += nByte; in tmMalloc()
170 pAgg->nOutByte += nByte; in tmMalloc()
208 memset(pUser, 0x58, pHdr->nByte); in tmFree()
217 pNew = tmMalloc(pTm, nByte); in tmRealloc()
222 memcpy(pNew, p, MIN(nByte, pHdr->nByte)); in tmRealloc()
259 int nByte = 0; in tmMallocCheck() local
[all …]
H A Dlsmtest8.c85 void testReadFile(const char *zFile, int iOff, void *pOut, int nByte, int *pRc){ in testReadFile() argument
95 assert( nByte>=0 ); in testReadFile()
96 if( (size_t)nByte!=fread(pOut, 1, nByte, fd) ){ in testReadFile()
109 int nByte, in testWriteFile() argument
121 assert( nByte>=0 ); in testWriteFile()
122 if( (size_t)nByte!=fwrite(pOut, 1, nByte, fd) ){ in testWriteFile()
/sqlite-3.40.0/tool/
H A Dshowwal.c59 unsigned int nByte, in extendCksum() argument
77 while( nByte>0 ){ in extendCksum()
86 nByte -= 8; in extendCksum()
122 aData = malloc(nByte); in getContent()
125 read(fd, aData, nByte); in getContent()
156 if( i+j>nByte ){ in print_byte_range()
163 if( i+j>nByte ){ in print_byte_range()
187 if( j>=nByte ){ in print_decode_line()
568 int nByte, hdrSize; in main() local
573 nByte = pagesize-100; in main()
[all …]
H A Dshowdb.c147 memset(aData, 0, nByte+32); in fileRead()
157 if( got>0 && got<nByte ) memset(aData+got, 0, nByte-got); in fileRead()
209 aData = fileRead(ofst, nByte); in print_byte_range()
213 if( i+j>nByte ){ break; } in print_byte_range()
219 if( i+j>nByte ){ in print_byte_range()
226 if( i+j>nByte ){ in print_byte_range()
264 if( j>=nByte ){ in print_decode_line()
475 if( j>=nByte ){ in printBytes()
1192 int ofst, nByte, hdrSize; in main() local
1196 nByte = g.pagesize-100; in main()
[all …]
H A Dshowshm.c39 static unsigned char *getContent(int ofst, int nByte){ in getContent() argument
41 aData = malloc(nByte); in getContent()
44 read(fd, aData, nByte); in getContent()
59 int ofst, int nByte, /* Start and size of decode */ in print_decode_line() argument
69 if( j>=nByte ){ in print_decode_line()
77 if( nByte==8 ){ in print_decode_line()
84 assert( nByte==4 ); in print_decode_line()
95 }else if( nByte<8 ){ in print_decode_line()
/sqlite-3.40.0/ext/misc/
H A Dcksumvfs.c238 static int cksmRandomness(sqlite3_vfs*, int nByte, char *zOut);
308 u32 *aEnd = (u32*)&a[nByte]; in cksmCompute()
311 assert( nByte>=8 ); in cksmCompute()
312 assert( (nByte&0x00000007)==0 ); in cksmCompute()
313 assert( nByte<=65536 ); in cksmCompute()
347 int nByte; in cksmVerifyFunc() local
353 nByte = sqlite3_value_bytes(argv[0]); in cksmVerifyFunc()
354 if( nByte<512 || nByte>65536 || (nByte & (nByte-1))!=0 ) return; in cksmVerifyFunc()
355 cksmCompute(data, nByte-8, cksum); in cksmVerifyFunc()
386 int nByte = 8; in cksmInitFunc() local
[all …]
/sqlite-3.40.0/ext/recover/
H A Dsqlite3recover.c331 assert( nByte>0 ); in recoverMalloc()
1049 int nByte = 0; in recoverAddTable() local
1656 int nByte = 0; in recoverWriteDataInit() local
2098 int nByte = 0; in recoverIsValidPage() local
2118 int nByte = 0; in recoverIsValidPage() local
2124 nByte += recoverGetVarint(&a[iOff+nByte], &nPayload); in recoverIsValidPage()
2127 nByte += recoverGetVarint(&a[iOff+nByte], &dummy); in recoverIsValidPage()
2137 nByte += K+4; in recoverIsValidPage()
2139 nByte += M+4; in recoverIsValidPage()
2303 if( nByte==16 ){ in recoverVfsRead()
[all …]
/sqlite-3.40.0/ext/session/
H A Dsqlite3session.c383 nByte = 1; in sessionSerializeValue()
403 nByte = 9; in sessionSerializeValue()
431 nByte = 1; in sessionSerializeValue()
1402 nByte = 0; in sessionPreupdateOneChange()
1410 sessionSerializeValue(&pC->aRecord[nByte], p, &nByte); in sessionPreupdateOneChange()
2195 int nByte; in sessionAppendCol() local
2948 int nByte; in sessionSkipRecord() local
3039 int nByte; in sessionReadRecord() local
3043 if( nByte<0 || nByte>pIn->nData-pIn->iNext ){ in sessionReadRecord()
3131 int nByte = 0; in sessionChangesetBufferRecord() local
[all …]
/sqlite-3.40.0/ext/async/
H A Dsqlite3async.c459 int nByte; /* See above */ member
591 int nByte, in addNewAsyncWrite() argument
610 p->nByte = nByte; in addNewAsyncWrite()
615 memcpy(p->zBuf, zByte, nByte); in addNewAsyncWrite()
1041 int nByte; in asyncOpen() local
1055 nByte = ( in asyncOpen()
1060 z = sqlite3_malloc(nByte); in asyncOpen()
1064 memset(z, 0, nByte); in asyncOpen()
1102 memset(pLock, 0, nByte); in asyncOpen()
1274 pVfs->xDlError(pVfs, nByte, zErrMsg); in asyncDlError()
[all …]
/sqlite-3.40.0/ext/fts3/
H A Dfts3_expr.c125 void *sqlite3Fts3MallocZero(sqlite3_int64 nByte){ in sqlite3Fts3MallocZero() argument
126 void *pRet = sqlite3_malloc64(nByte); in sqlite3Fts3MallocZero()
127 if( pRet ) memset(pRet, 0, nByte); in sqlite3Fts3MallocZero()
331 memcpy(&zTemp[nTemp], zByte, nByte); in getNextString()
332 nTemp += nByte; in getNextString()
334 pToken->n = nByte; in getNextString()
628 int nByte = 0; in fts3ExprParse() local
718 assert( nByte>0 ); in fts3ExprParse()
720 assert( rc!=SQLITE_OK || (nByte>0 && nByte<=nIn) ); in fts3ExprParse()
721 nIn -= nByte; in fts3ExprParse()
[all …]
H A Dfts3_tokenize_vtab.c118 int nByte = 0; in fts3tokDequoteArray() local
122 nByte += (int)(strlen(argv[i]) + 1); in fts3tokDequoteArray()
125 *pazDequote = azDequote = sqlite3_malloc64(sizeof(char *)*argc + nByte); in fts3tokDequoteArray()
349 int nByte = sqlite3_value_bytes(apVal[0]); in fts3tokFilterMethod() local
350 pCsr->zInput = sqlite3_malloc64(nByte+1); in fts3tokFilterMethod()
354 if( nByte>0 ) memcpy(pCsr->zInput, zByte, nByte); in fts3tokFilterMethod()
355 pCsr->zInput[nByte] = 0; in fts3tokFilterMethod()
356 rc = pTab->pMod->xOpen(pTab->pTok, pCsr->zInput, nByte, &pCsr->pCsr); in fts3tokFilterMethod()
H A Dfts3_icu.c189 int nByte = 0; in icuNext() local
214 if( nByte ){ in icuNext()
215 char *zNew = sqlite3_realloc(pCsr->zBuffer, nByte); in icuNext()
220 pCsr->nBuffer = nByte; in icuNext()
224 pCsr->zBuffer, pCsr->nBuffer, &nByte, /* Output vars */ in icuNext()
228 } while( nByte>pCsr->nBuffer ); in icuNext()
231 *pnBytes = nByte; in icuNext()
/sqlite-3.40.0/ext/fts5/
H A Dfts5_hash.c93 sqlite3_int64 nByte; in sqlite3Fts5HashNew() local
99 nByte = sizeof(Fts5HashEntry*) * pNew->nSlot; in sqlite3Fts5HashNew()
100 pNew->aSlot = (Fts5HashEntry**)sqlite3_malloc64(nByte); in sqlite3Fts5HashNew()
106 memset(pNew->aSlot, 0, (size_t)nByte); in sqlite3Fts5HashNew()
215 int nByte = sqlite3Fts5GetVarintLen((u32)nPos); in fts5HashAddPoslistSize() local
216 memmove(&pPtr[p->iSzPoslist + nByte], &pPtr[p->iSzPoslist + 1], nSz); in fts5HashAddPoslistSize()
218 nData += (nByte-1); in fts5HashAddPoslistSize()
273 sqlite3_int64 nByte = sizeof(Fts5HashEntry) + (nToken+1) + 1 + 64; in sqlite3Fts5HashWrite() local
274 if( nByte<128 ) nByte = 128; in sqlite3Fts5HashWrite()
284 p = (Fts5HashEntry*)sqlite3_malloc64(nByte); in sqlite3Fts5HashWrite()
[all …]
H A Dfts5_test_tok.c133 int nByte = 0; in fts5tokDequoteArray() local
137 nByte += (int)(strlen(argv[i]) + 1); in fts5tokDequoteArray()
140 *pazDequote = azDequote = sqlite3_malloc64(sizeof(char *)*argc + nByte); in fts5tokDequoteArray()
376 int nByte = sqlite3_value_bytes(apVal[0]); in fts5tokFilterMethod() local
377 pCsr->zInput = sqlite3_malloc(nByte+1); in fts5tokFilterMethod()
381 if( nByte>0 ) memcpy(pCsr->zInput, zByte, nByte); in fts5tokFilterMethod()
382 pCsr->zInput[nByte] = 0; in fts5tokFilterMethod()
384 pTab->pTok, (void*)pCsr, 0, zByte, nByte, fts5tokCb in fts5tokFilterMethod()
H A Dfts5_expr.c268 const int nByte = sizeof(Fts5ExprNode); in sqlite3Fts5ExprNew() local
1601 sqlite3_int64 nByte; in sqlite3Fts5ParseNearset() local
1603 pRet = sqlite3_malloc64(nByte); in sqlite3Fts5ParseNearset()
1607 memset(pRet, 0, (size_t)nByte); in sqlite3Fts5ParseNearset()
1611 sqlite3_int64 nByte; in sqlite3Fts5ParseNearset() local
1686 memset(pSyn, 0, (size_t)nByte); in fts5ParseTokenize()
1848 sqlite3_int64 nByte; in sqlite3Fts5ExprClonePhrase() local
2070 memcpy(pRet, pOrig, (size_t)nByte); in fts5CloneColset()
2222 int nByte; in fts5ParsePhraseToAnd() local
2418 sqlite3_int64 nByte = 0; in fts5ExprTermPrint() local
[all …]
/sqlite-3.40.0/ext/fts2/
H A Dfts2_icu.c188 int nByte = 0; in icuNext() local
213 if( nByte ){ in icuNext()
214 char *zNew = sqlite3_realloc(pCsr->zBuffer, nByte); in icuNext()
219 pCsr->nBuffer = nByte; in icuNext()
223 pCsr->zBuffer, pCsr->nBuffer, &nByte, /* Output vars */ in icuNext()
227 } while( nByte>pCsr->nBuffer ); in icuNext()
230 *pnBytes = nByte; in icuNext()

123456