Home
last modified time | relevance | path

Searched refs:nAlloc (Results 1 – 25 of 66) sorted by relevance

123

/sqlite-3.40.0/ext/lsm1/
H A Dlsm_str.c35 if( pStr->n + nNew >= pStr->nAlloc ){ in lsmStringExtend()
36 int nAlloc = pStr->n + nNew + 100; in lsmStringExtend() local
37 char *zNew = lsmRealloc(pStr->pEnv, pStr->z, nAlloc); in lsmStringExtend()
40 nAlloc = 0; in lsmStringExtend()
43 pStr->nAlloc = nAlloc; in lsmStringExtend()
68 if( pStr->nAlloc ){ in lsmStringAppend()
78 if( pStr->nAlloc ){ in lsmStringBinAppend()
106 nAvail = pStr->nAlloc - pStr->n; in lsmStringVAppendf()
111 if( pStr->nAlloc==0 ) return; in lsmStringVAppendf()
H A Dlsm_vtab.c142 u64 nAlloc; /* Bytes of space allocated */ member
159 if( p->n+N>p->nAlloc ){ in lsm1VblobEnlarge()
161 p->nAlloc += N + (p->nAlloc ? p->nAlloc : N); in lsm1VblobEnlarge()
162 p->a = sqlite3_realloc64(p->a, p->nAlloc); in lsm1VblobEnlarge()
165 p->nAlloc = 0; in lsm1VblobEnlarge()
169 p->nAlloc = sqlite3_msize(p->a); in lsm1VblobEnlarge()
180 if( p->n+N>p->nAlloc && lsm1VblobEnlarge(p, N) ) return; in lsm1VblobEnlargeAndAppend()
188 if( n+N>p->nAlloc ){ in lsm1VblobAppend()
502 if( n+9>p->nAlloc && lsm1VblobEnlarge(p, 9) ) return; in lsm1VblobAppendVarint()
H A Dlsm_shared.c109 assert( p->nAlloc>=p->nEntry ); in freelistAppend()
110 if( p->nAlloc==p->nEntry ){ in freelistAppend()
115 nNew = (p->nAlloc==0 ? 4 : p->nAlloc*2); in freelistAppend()
119 p->nAlloc = nNew; in freelistAppend()
1645 int nAlloc; in lsmShmCacheChunks() local
1652 nAlloc = ((db->nShm + NINCR - 1) / NINCR) * NINCR; in lsmShmCacheChunks()
1653 while( nChunk>=nAlloc ){ in lsmShmCacheChunks()
1655 nAlloc += NINCR; in lsmShmCacheChunks()
1674 nAlloc = ((p->nShmChunk + NINCR - 1) / NINCR) * NINCR; in lsmShmCacheChunks()
1675 while( nChunk>=nAlloc ){ in lsmShmCacheChunks()
[all …]
/sqlite-3.40.0/src/
H A Dtable.c30 u32 nAlloc; /* Slots allocated for azResult[] */ member
56 if( p->nData + need > p->nAlloc ){ in sqlite3_get_table_cb()
58 p->nAlloc = p->nAlloc*2 + need; in sqlite3_get_table_cb()
59 azNew = sqlite3Realloc( p->azResult, sizeof(char*)*p->nAlloc ); in sqlite3_get_table_cb()
138 res.nAlloc = 20; in sqlite3_get_table()
140 res.azResult = sqlite3_malloc64(sizeof(char*)*res.nAlloc ); in sqlite3_get_table()
166 if( res.nAlloc>res.nData ){ in sqlite3_get_table()
H A Dtest_hexio.c394 int nAlloc = 0; in make_fts3record() local
408 if( nOut+10>nAlloc ){ in make_fts3record()
409 int nNew = nAlloc?nAlloc*2:128; in make_fts3record()
416 nAlloc = nNew; in make_fts3record()
422 while( (nOut + nVal)>nAlloc ){ in make_fts3record()
423 int nNew = nAlloc?nAlloc*2:128; in make_fts3record()
430 nAlloc = nNew; in make_fts3record()
H A Dmem2.c119 int nAlloc[NCSIZE]; /* Total number of allocations */ member
135 mem.nAlloc[i]++; in adjustStats()
502 if( mem.nAlloc[i] ){ in sqlite3MemdebugDump()
504 i*8, mem.nAlloc[i], mem.nCurrent[i], mem.mxCurrent[i]); in sqlite3MemdebugDump()
507 if( mem.nAlloc[NCSIZE-1] ){ in sqlite3MemdebugDump()
509 NCSIZE*8-8, mem.nAlloc[NCSIZE-1], in sqlite3MemdebugDump()
522 nTotal += mem.nAlloc[i]; in sqlite3MemdebugMallocCount()
H A Dmem5.c109 u64 nAlloc; /* Total number of calls to malloc */ member
268 mem5.nAlloc++; in memsys5MallocUnsafe()
493 int nAlloc = (1<<ii); in memsys5Init() local
494 if( (iOffset+nAlloc)<=mem5.nBlock ){ in memsys5Init()
497 iOffset += nAlloc; in memsys5Init()
499 assert((iOffset+nAlloc)>mem5.nBlock); in memsys5Init()
545 fprintf(out, "mem5.nAlloc = %llu\n", mem5.nAlloc); in sqlite3Memsys5Dump()
H A Dprintf.c183 if( n>pAccum->nAlloc && n>pAccum->mxAlloc ){ in printfTempBuf()
773 pAccum->nAlloc = sqlite3DbMallocSize(pAccum->db, bufpt); in sqlite3_str_vappendf()
983 return p->nAlloc - p->nChar - 1; in sqlite3StrAccumEnlarge()
998 p->nAlloc = (int)szNew; in sqlite3StrAccumEnlarge()
1001 zNew = sqlite3DbRealloc(p->db, zOld, p->nAlloc); in sqlite3StrAccumEnlarge()
1003 zNew = sqlite3Realloc(zOld, p->nAlloc); in sqlite3StrAccumEnlarge()
1009 p->nAlloc = sqlite3DbMallocSize(p->db, zNew); in sqlite3StrAccumEnlarge()
1055 assert( p->accError==0 || p->nAlloc==0 || p->mxAlloc==0 ); in sqlite3_str_append()
1056 if( p->nChar+N >= p->nAlloc ){ in sqlite3_str_append()
1165 p->nAlloc = 0; in sqlite3_str_reset()
[all …]
H A Djson.c157 p->nAlloc = sizeof(p->zSpace); in jsonZero()
192 u64 nTotal = N<p->nAlloc ? p->nAlloc*2 : p->nAlloc+N+10; in jsonGrow()
212 p->nAlloc = nTotal; in jsonGrow()
239 if( p->nUsed>=p->nAlloc && jsonGrow(p,1)!=0 ) return; in jsonAppendChar()
294 assert( p->nUsed<p->nAlloc ); in jsonAppendString()
376 pParse->nAlloc = 0; in jsonParseReset()
710 assert( pParse->nNode>=pParse->nAlloc ); in jsonParseAddNodeExpand()
712 nNew = pParse->nAlloc*2 + 10; in jsonParseAddNodeExpand()
718 pParse->nAlloc = nNew; in jsonParseAddNodeExpand()
720 assert( pParse->nNode<pParse->nAlloc ); in jsonParseAddNodeExpand()
[all …]
/sqlite-3.40.0/ext/misc/
H A Deval.c27 sqlite3_int64 nAlloc; /* Number of bytes allocated for z[] */ member
41 if( (sqlite3_int64)sz+p->nUsed+p->szSep+1 > p->nAlloc ){ in callback()
43 p->nAlloc = p->nAlloc*2 + sz + p->szSep + 1; in callback()
47 zNew = p->nAlloc<=0x7fffffff ? sqlite3_realloc64(p->z, p->nAlloc) : 0; in callback()
H A Ddbdump.c72 int nAlloc; /* Number of bytes allocated to z[] */ member
107 if( p->n+len>=p->nAlloc ){ in appendText()
109 p->nAlloc = p->nAlloc*2 + len + 20; in appendText()
110 zNew = sqlite3_realloc(p->z, p->nAlloc); in appendText()
183 int nAlloc = 0; in tableColumnList() local
195 if( nCol>=nAlloc-2 ){ in tableColumnList()
197 nAlloc = nAlloc*2 + nCol + 10; in tableColumnList()
198 azNew = sqlite3_realloc64(azCol, nAlloc*sizeof(azCol[0])); in tableColumnList()
H A Dpercentile.c73 unsigned nAlloc; /* Number of slots allocated for a[] */ member
152 if( p->nUsed>=p->nAlloc ){ in percentStep()
153 unsigned n = p->nAlloc*2 + 250; in percentStep()
161 p->nAlloc = n; in percentStep()
H A Dnextchar.c69 int nAlloc; /* Space allocated to aResult */ member
85 if( p->nUsed+1 > p->nAlloc ){ in nextCharAppend()
87 int n = p->nAlloc*2 + 30; in nextCharAppend()
94 p->nAlloc = n; in nextCharAppend()
H A Dcsv.c78 int nAlloc; /* Space allocated for z[] */ member
93 p->nAlloc = 0; in csv_reader_init()
177 int nNew = p->nAlloc*2 + 100; in csv_resize_and_append()
181 p->nAlloc = nNew; in csv_resize_and_append()
193 if( p->n>=p->nAlloc-1 ) return csv_resize_and_append(p, c); in csv_append()
283 assert( p->z==0 || p->n<p->nAlloc ); in csv_read_one_field()
H A Dregexp.c160 unsigned nAlloc; /* Slots allocated for aOp[] and aArg[] */ member
384 p->nAlloc = N; in re_resize()
393 if( p->nAlloc<=p->nState && re_resize(p, p->nAlloc*2) ) return 0; in re_insert()
414 if( p->nState+N>=p->nAlloc && re_resize(p, p->nAlloc*2+N) ) return; in re_copy()
H A Dzipfile.c820 sqlite3_int64 nAlloc; in zipfileGetEntry() local
827 nAlloc = sizeof(ZipfileEntry) + nExtra; in zipfileGetEntry()
829 nAlloc += zipfileGetU32(&aRead[ZIPFILE_CDS_SZCOMPRESSED_OFF]); in zipfileGetEntry()
832 pNew = (ZipfileEntry*)sqlite3_malloc64(nAlloc); in zipfileGetEntry()
996 sqlite3_int64 nAlloc; in zipfileDeflate() local
1005 nAlloc = deflateBound(&str, nIn); in zipfileDeflate()
1006 aOut = (u8*)sqlite3_malloc64(nAlloc); in zipfileDeflate()
1012 str.avail_out = nAlloc; in zipfileDeflate()
1913 int nAlloc; /* Byte allocated at a[] */ member
1924 if( pBuf->n+nByte>pBuf->nAlloc ){ in zipfileBufferGrow()
[all …]
/sqlite-3.40.0/tool/
H A Dfuzzershell.c248 if( p->n + n >= p->nAlloc ){ in StrAppend()
252 nNew = p->nAlloc*2 + 100 + n; in StrAppend()
261 p->nAlloc = nNew; in StrAppend()
304 p->nAlloc = p->nAlloc*2 + sz + p->szSep + 1; in callback()
308 zNew = p->nAlloc<=0x7fffffff ? sqlite3_realloc(p->z, (int)p->nAlloc) : 0; in callback()
979 nAlloc = 1000; in main()
980 zIn = malloc(nAlloc); in main()
1002 got = fread(zIn+nIn, 1, nAlloc-nIn-1, in); in main()
1006 if( nAlloc - nIn - 1 < 100 ){ in main()
1007 nAlloc += nAlloc+1000; in main()
[all …]
H A Dshowlocks.c31 int nAlloc = 1; in showLocksInRange() local
58 if( nPending+2 > nAlloc ){ in showLocksInRange()
59 nAlloc = nAlloc*2 + 2; in showLocksInRange()
60 aPending = realloc(aPending, sizeof(aPending[0])*nAlloc ); in showLocksInRange()
/sqlite-3.40.0/test/
H A Dthreadtest1.c63 int nAlloc; /* Number of slots allocated for azElem[] */ member
78 if( pResult->nElem + nArg >= pResult->nAlloc ){ in db_query_callback()
79 if( pResult->nAlloc==0 ){ in db_query_callback()
80 pResult->nAlloc = nArg+1; in db_query_callback()
82 pResult->nAlloc = pResult->nAlloc*2 + nArg + 1; in db_query_callback()
84 pResult->azElem = realloc( pResult->azElem, pResult->nAlloc*sizeof(char*)); in db_query_callback()
H A Dfuzzcheck.c748 a = sqlite3_malloc64( nAlloc ); in decodeDatabase()
753 memset(a, 0, (size_t)nAlloc); in decodeDatabase()
763 if( j>=nAlloc ){ in decodeDatabase()
773 newSize = nAlloc*2; in decodeDatabase()
790 assert( newSize > nAlloc ); in decodeDatabase()
791 memset(a+nAlloc, 0, (size_t)(newSize - nAlloc)); in decodeDatabase()
792 nAlloc = newSize; in decodeDatabase()
798 assert( j<nAlloc ); in decodeDatabase()
1153 int nAlloc = 0; in runCombinedDbSqlInput() local
1158 sqlite3_memory_used(), nAlloc); in runCombinedDbSqlInput()
[all …]
H A Ddbfuzz2.c234 int nAlloc = 0; in LLVMFuzzerTestOneInput() local
236 sqlite3_status(SQLITE_STATUS_MALLOC_COUNT, &nAlloc, &nNotUsed, 0); in LLVMFuzzerTestOneInput()
238 sqlite3_memory_used(), nAlloc); in LLVMFuzzerTestOneInput()
/sqlite-3.40.0/ext/lsm1/lsm-test/
H A Dlsmtest_io.c173 int nAlloc = 128; in readStdin() local
180 nAlloc = nAlloc*2; in readStdin()
181 zOut = realloc(zOut, nAlloc); in readStdin()
182 nRead = fread(&zOut[nOut], 1, nAlloc-nOut-1, stdin); in readStdin()
/sqlite-3.40.0/ext/fts5/
H A Dfts5_hash.c63 int nAlloc; /* Total size of allocation */ member
287 p->nAlloc = (int)nByte; in sqlite3Fts5HashWrite()
321 if( (p->nAlloc - p->nData) < (9 + 4 + 1 + 3 + 5) ){ in sqlite3Fts5HashWrite()
322 sqlite3_int64 nNew = p->nAlloc * 2; in sqlite3Fts5HashWrite()
327 pNew->nAlloc = (int)nNew; in sqlite3Fts5HashWrite()
334 assert( (p->nAlloc - p->nData) >= (9 + 4 + 1 + 3 + 5) ); in sqlite3Fts5HashWrite()
/sqlite-3.40.0/ext/fts3/
H A Dfts3_unicode.c97 int nAlloc; /* space allocated at zToken */ member
347 if( (zOut-pCsr->zToken)>=(pCsr->nAlloc-4) ){ in unicodeNext()
348 char *zNew = sqlite3_realloc64(pCsr->zToken, pCsr->nAlloc+64); in unicodeNext()
352 pCsr->nAlloc += 64; in unicodeNext()
H A Dfts3_snippet.c124 int nAlloc; /* Allocated size of buffer z in bytes */ member
614 if( pStr->n+nAppend+1>=pStr->nAlloc ){ in fts3StringAppend()
615 sqlite3_int64 nAlloc = pStr->nAlloc+(sqlite3_int64)nAppend+100; in fts3StringAppend() local
616 char *zNew = sqlite3_realloc64(pStr->z, nAlloc); in fts3StringAppend()
621 pStr->nAlloc = nAlloc; in fts3StringAppend()
623 assert( pStr->z!=0 && (pStr->nAlloc >= pStr->n+nAppend+1) ); in fts3StringAppend()

123