Home
last modified time | relevance | path

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

1234

/external/chromium_org/third_party/sqlite/src/src/
Dmem1.c37 static void *sqlite3MemMalloc(int nByte){ in sqlite3MemMalloc() argument
39 assert( nByte>0 ); in sqlite3MemMalloc()
40 nByte = ROUND8(nByte); in sqlite3MemMalloc()
41 p = malloc( nByte+8 ); in sqlite3MemMalloc()
43 p[0] = nByte; in sqlite3MemMalloc()
47 sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes of memory", nByte); in sqlite3MemMalloc()
89 static void *sqlite3MemRealloc(void *pPrior, int nByte){ in sqlite3MemRealloc() argument
91 assert( pPrior!=0 && nByte>0 ); in sqlite3MemRealloc()
92 assert( nByte==ROUND8(nByte) ); /* EV: R-46199-30249 */ in sqlite3MemRealloc()
94 p = realloc(p, nByte+8 ); in sqlite3MemRealloc()
[all …]
Dmem2.c219 static void randomFill(char *pBuf, int nByte){ in randomFill() argument
222 y = nByte | 1; in randomFill()
223 while( nByte >= 4 ){ in randomFill()
229 nByte -= 4; in randomFill()
231 while( nByte-- > 0 ){ in randomFill()
242 static void *sqlite3MemMalloc(int nByte){ in sqlite3MemMalloc() argument
252 nReserve = ROUND8(nByte); in sqlite3MemMalloc()
278 mem.xBacktrace(nByte, pHdr->nBacktrace-1, &aAddr[1]); in sqlite3MemMalloc()
286 pHdr->iSize = nByte; in sqlite3MemMalloc()
287 adjustStats(nByte, +1); in sqlite3MemMalloc()
[all …]
Dstatus.c164 int nByte = 0; /* Used to accumulate return value */ in sqlite3_db_status() local
167 db->pnBytesFreed = &nByte; in sqlite3_db_status()
173 nByte += sqlite3GlobalConfig.m.xRoundup(sizeof(HashElem)) * ( in sqlite3_db_status()
179 nByte += sqlite3MallocSize(pSchema->tblHash.ht); in sqlite3_db_status()
180 nByte += sqlite3MallocSize(pSchema->trigHash.ht); in sqlite3_db_status()
181 nByte += sqlite3MallocSize(pSchema->idxHash.ht); in sqlite3_db_status()
182 nByte += sqlite3MallocSize(pSchema->fkeyHash.ht); in sqlite3_db_status()
196 *pCurrent = nByte; in sqlite3_db_status()
207 int nByte = 0; /* Used to accumulate return value */ in sqlite3_db_status() local
209 db->pnBytesFreed = &nByte; in sqlite3_db_status()
[all …]
Dmem5.c241 static void *memsys5MallocUnsafe(int nByte){ in memsys5MallocUnsafe() argument
248 assert( nByte>0 ); in memsys5MallocUnsafe()
252 if( (u32)nByte>mem5.maxRequest ){ in memsys5MallocUnsafe()
253 mem5.maxRequest = nByte; in memsys5MallocUnsafe()
259 if( nByte > 0x40000000 ){ in memsys5MallocUnsafe()
264 for(iFullSz=mem5.szAtom, iLogsize=0; iFullSz<nByte; iFullSz *= 2, iLogsize++){} in memsys5MallocUnsafe()
273 sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes", nByte); in memsys5MallocUnsafe()
290 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 …]
Dtest_wsd.c70 int nByte = ROUND8(sizeof(ProcessLocalVar) + L); in sqlite3_wsd_find() local
71 assert( pGlobal->nFree>=nByte ); in sqlite3_wsd_find()
76 pGlobal->nFree -= nByte; in sqlite3_wsd_find()
77 pGlobal->pFree += nByte; in sqlite3_wsd_find()
Dtest_vfs.c179 static void tvfsDlError(sqlite3_vfs*, int nByte, char *zErrMsg);
183 static int tvfsRandomness(sqlite3_vfs*, int nByte, char *zOut);
279 int nByte; in tvfsExecTcl() local
287 nByte = (nScript+TESTVFS_MAX_ARGS)*sizeof(Tcl_Obj *); in tvfsExecTcl()
288 p->apScript = (Tcl_Obj **)ckalloc(nByte); in tvfsExecTcl()
289 memset(p->apScript, 0, nByte); in tvfsExecTcl()
579 int nByte; in tvfsOpen() local
582 nByte = sizeof(sqlite3_io_methods); in tvfsOpen()
584 nByte = offsetof(sqlite3_io_methods, xShmMap); in tvfsOpen()
587 pMethods = (sqlite3_io_methods *)ckalloc(nByte); in tvfsOpen()
[all …]
Dvdbemem.c150 int nByte; in sqlite3VdbeMemExpandBlob() local
156 nByte = pMem->n + pMem->u.nZero; in sqlite3VdbeMemExpandBlob()
157 if( nByte<=0 ){ in sqlite3VdbeMemExpandBlob()
158 nByte = 1; in sqlite3VdbeMemExpandBlob()
160 if( sqlite3VdbeMemGrow(pMem, nByte, 1) ){ in sqlite3VdbeMemExpandBlob()
206 const int nByte = 32; in sqlite3VdbeMemStringify() local
216 if( sqlite3VdbeMemGrow(pMem, nByte, 0) ){ in sqlite3VdbeMemStringify()
227 sqlite3_snprintf(nByte, pMem->z, "%lld", pMem->u.i); in sqlite3VdbeMemStringify()
230 sqlite3_snprintf(nByte, pMem->z, "%!.15g", pMem->r); in sqlite3VdbeMemStringify()
695 int nByte = n; /* New value for pMem->n */ in sqlite3VdbeMemSetStr() local
[all …]
Dos_win.c199 int nByte; in unicodeToUtf8() local
202 nByte = WideCharToMultiByte(CP_UTF8, 0, zWideFilename, -1, 0, 0, 0, 0); in unicodeToUtf8()
203 zFilename = malloc( nByte ); in unicodeToUtf8()
207 nByte = WideCharToMultiByte(CP_UTF8, 0, zWideFilename, -1, zFilename, nByte, in unicodeToUtf8()
209 if( nByte == 0 ){ in unicodeToUtf8()
224 int nByte; in mbcsToUnicode() local
228 nByte = MultiByteToWideChar(codepage, 0, zFilename, -1, NULL,0)*sizeof(WCHAR); in mbcsToUnicode()
229 zMbcsFilename = malloc( nByte*sizeof(zMbcsFilename[0]) ); in mbcsToUnicode()
233 nByte = MultiByteToWideChar(codepage, 0, zFilename, -1, zMbcsFilename, nByte); in mbcsToUnicode()
234 if( nByte==0 ){ in mbcsToUnicode()
[all …]
Dtest_server.c228 int nByte; /* Size of the zIn parameter for prepare() */ member
343 int nByte, in sqlite3_client_prepare() argument
351 msg.nByte = nByte; in sqlite3_client_prepare()
428 pMsg->errCode = sqlite3_prepare(pMsg->pDb, pMsg->zIn, pMsg->nByte, in sqlite3_server()
Dtest_malloc.c314 int nByte; in test_malloc() local
321 if( Tcl_GetIntFromObj(interp, objv[1], &nByte) ) return TCL_ERROR; in test_malloc()
322 p = sqlite3_malloc((unsigned)nByte); in test_malloc()
339 int nByte; in test_realloc() local
346 if( Tcl_GetIntFromObj(interp, objv[2], &nByte) ) return TCL_ERROR; in test_realloc()
351 p = sqlite3_realloc(pPrior, (unsigned)nByte); in test_realloc()
741 int nByte; member
745 static void test_memdebug_callback(int nByte, int nFrame, void **aFrame){ in test_memdebug_callback() argument
770 pLog->nByte += nByte; in test_memdebug_callback()
846 apElem[1] = Tcl_NewIntObj(pLog->nByte); in test_memdebug_log()
[all …]
Dtest_devsym.c67 static void devsymDlError(sqlite3_vfs*, int nByte, char *zErrMsg);
71 static int devsymRandomness(sqlite3_vfs*, int nByte, char *zOut);
332 static void devsymDlError(sqlite3_vfs *pVfs, int nByte, char *zErrMsg){ in devsymDlError() argument
333 sqlite3OsDlError(g.pVfs, nByte, zErrMsg); in devsymDlError()
355 static int devsymRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){ in devsymRandomness() argument
356 return sqlite3OsRandomness(g.pVfs, nByte, zBufOut); in devsymRandomness()
Dtest_osinst.c164 static void vfslogDlError(sqlite3_vfs*, int nByte, char *zErrMsg);
167 static int vfslogRandomness(sqlite3_vfs*, int nByte, char *zOut);
560 static void vfslogDlError(sqlite3_vfs *pVfs, int nByte, char *zErrMsg){ in vfslogDlError() argument
561 REALVFS(pVfs)->xDlError(REALVFS(pVfs), nByte, zErrMsg); in vfslogDlError()
582 static int vfslogRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){ in vfslogRandomness() argument
583 return REALVFS(pVfs)->xRandomness(REALVFS(pVfs), nByte, zBufOut); in vfslogRandomness()
708 int nByte; in sqlite3_vfslog_new() local
720 nByte = sizeof(VfslogVfs) + pParent->szOsFile + nVfs+1+pParent->mxPathname+1; in sqlite3_vfslog_new()
721 p = (VfslogVfs *)sqlite3_malloc(nByte); in sqlite3_vfslog_new()
722 memset(p, 0, nByte); in sqlite3_vfslog_new()
[all …]
Dmem0.c31 static void *sqlite3MemMalloc(int nByte){ return 0; } in sqlite3MemMalloc() argument
33 static void *sqlite3MemRealloc(void *pPrior, int nByte){ return 0; } in sqlite3MemRealloc() argument
Dtest_vfstrace.c72 static void vfstraceDlError(sqlite3_vfs*, int nByte, char *zErrMsg);
75 static int vfstraceRandomness(sqlite3_vfs*, int nByte, char *zOut);
607 static void vfstraceDlError(sqlite3_vfs *pVfs, int nByte, char *zErrMsg){ in vfstraceDlError() argument
610 vfstrace_printf(pInfo, "%s.xDlError(%d)", pInfo->zVfsName, nByte); in vfstraceDlError()
611 pRoot->xDlError(pRoot, nByte, zErrMsg); in vfstraceDlError()
639 static int vfstraceRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){ in vfstraceRandomness() argument
642 vfstrace_printf(pInfo, "%s.xRandomness(%d)\n", pInfo->zVfsName, nByte); in vfstraceRandomness()
643 return pRoot->xRandomness(pRoot, nByte, zBufOut); in vfstraceRandomness()
725 int nByte; in vfstrace_register() local
730 nByte = sizeof(*pNew) + sizeof(*pInfo) + nName + 1; in vfstrace_register()
[all …]
Dvdbeaux.c322 int nByte = (p->nSub+1)*sizeof(SubProgram*); in opIterNext() local
328 p->apSub = sqlite3DbReallocOrFree(v->db, p->apSub, nByte); in opIterNext()
733 int nField, nByte; in sqlite3VdbeChangeP4() local
736 nByte = sizeof(*pKeyInfo) + (nField-1)*sizeof(pKeyInfo->aColl[0]) + nField; in sqlite3VdbeChangeP4()
737 pKeyInfo = sqlite3DbMallocRaw(0, nByte); in sqlite3VdbeChangeP4()
741 memcpy((char*)pKeyInfo, zP4, nByte - nField); in sqlite3VdbeChangeP4()
1226 int nByte = (nSub+1)*sizeof(SubProgram*); in sqlite3VdbeList() local
1231 if( j==nSub && SQLITE_OK==sqlite3VdbeMemGrow(pSub, nByte, 1) ){ in sqlite3VdbeList()
1376 int nByte, /* Number of bytes to allocate */ in allocSpace() argument
1383 nByte = ROUND8(nByte); in allocSpace()
[all …]
Dutf.c386 int sqlite3Utf8CharLen(const char *zIn, int nByte){ in sqlite3Utf8CharLen() argument
390 if( nByte>=0 ){ in sqlite3Utf8CharLen()
391 zTerm = &z[nByte]; in sqlite3Utf8CharLen()
440 char *sqlite3Utf16to8(sqlite3 *db, const void *z, int nByte, u8 enc){ in sqlite3Utf16to8() argument
444 sqlite3VdbeMemSetStr(&m, z, nByte, enc, SQLITE_STATIC); in sqlite3Utf16to8()
/external/chromium_org/third_party/sqlite/src/tool/
Dshowwal.c51 static unsigned char *getContent(int ofst, int nByte){ in getContent() argument
53 aData = malloc(nByte); in getContent()
56 read(fd, aData, nByte); in getContent()
65 int nByte, /* Number of bytes to print */ in print_byte_range() argument
72 if( ((printOfst+nByte)&~0xfff)==0 ){ in print_byte_range()
74 }else if( ((printOfst+nByte)&~0xffff)==0 ){ in print_byte_range()
76 }else if( ((printOfst+nByte)&~0xfffff)==0 ){ in print_byte_range()
78 }else if( ((printOfst+nByte)&~0xffffff)==0 ){ in print_byte_range()
84 for(i=0; i<nByte; i += perLine){ in print_byte_range()
87 if( i+j>nByte ){ in print_byte_range()
[all …]
Dshowdb.c58 static unsigned char *getContent(int ofst, int nByte){ in getContent() argument
60 aData = malloc(nByte+32); in getContent()
62 memset(aData, 0, nByte+32); in getContent()
64 read(db, aData, nByte); in getContent()
73 int nByte, /* Number of bytes to print */ in print_byte_range() argument
80 if( ((printOfst+nByte)&~0xfff)==0 ){ in print_byte_range()
82 }else if( ((printOfst+nByte)&~0xffff)==0 ){ in print_byte_range()
84 }else if( ((printOfst+nByte)&~0xfffff)==0 ){ in print_byte_range()
86 }else if( ((printOfst+nByte)&~0xffffff)==0 ){ in print_byte_range()
92 aData = getContent(ofst, nByte); in print_byte_range()
[all …]
Dspeedtest8inst1.c85 sqlite3_int64 nByte; in readScriptFile() local
95 rc = p->pMethods->xFileSize(p, &nByte); in readScriptFile()
100 zData = (char *)malloc(nByte+1); in readScriptFile()
101 rc = p->pMethods->xRead(p, zData, nByte, 0); in readScriptFile()
105 zData[nByte] = '\0'; in readScriptFile()
109 *pnScript = nByte; in readScriptFile()
Dspeedtest16.c109 int nByte = 0; in main() local
146 nByte += j-i; in main()
161 printf("Bytes of SQL text: %15d\n", nByte); in main()
Dspeedtest8.c103 int nByte = 0; in main() local
218 nByte += n; in main()
237 printf("Bytes of SQL text: %15d bytes\n", nByte); in main()
/external/chromium_org/third_party/sqlite/src/ext/fts3/
Dfts3_expr.c114 static void *fts3MallocZero(int nByte){ in fts3MallocZero() argument
115 void *pRet = sqlite3_malloc(nByte); in fts3MallocZero()
116 if( pRet ) memset(pRet, 0, nByte); in fts3MallocZero()
151 int nByte; /* total space to allocate */ in getNextToken() local
157 nByte = sizeof(Fts3Expr) + sizeof(Fts3Phrase) + nToken; in getNextToken()
158 pRet = (Fts3Expr *)fts3MallocZero(nByte); in getNextToken()
236 int nByte = sizeof(Fts3Expr) + sizeof(Fts3Phrase); in getNextString() local
237 p = fts3ReallocOrFree(p, nByte+ii*sizeof(Fts3PhraseToken)); in getNextString()
243 memset(p, 0, nByte); in getNextString()
268 int nByte = sizeof(Fts3Expr) + sizeof(Fts3Phrase); in getNextString() local
[all …]
Dfts3_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()
/external/chromium_org/third_party/sqlite/src/ext/fts2/
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()
/external/chromium_org/third_party/sqlite/src/ext/async/
Dsqlite3async.c459 int nByte; /* See above */ member
591 int nByte, in addNewAsyncWrite() argument
598 p = sqlite3_malloc(sizeof(AsyncWrite) + (zByte?nByte:0)); in addNewAsyncWrite()
610 p->nByte = nByte; in addNewAsyncWrite()
615 memcpy(p->zBuf, zByte, nByte); in addNewAsyncWrite()
708 sqlite3_int64 nByte64 = (sqlite3_int64)pWrite->nByte; in asyncRead()
743 static int asyncTruncate(sqlite3_file *pFile, sqlite3_int64 nByte){ in asyncTruncate() argument
745 return addNewAsyncWrite(p, ASYNC_TRUNCATE, nByte, 0, 0); in asyncTruncate()
796 s = MAX(pWrite->iOffset + (sqlite3_int64)(pWrite->nByte), s); in asyncFileSize()
1041 int nByte; in asyncOpen() local
[all …]

1234