Lines Matching defs:mem

15047 ** into a single structure named "mem".  This is to keep the
15092 } mem;
15104 mem.nAlloc[i]++;
15105 mem.nCurrent[i]++;
15106 if( mem.nCurrent[i]>mem.mxCurrent[i] ){
15107 mem.mxCurrent[i] = mem.nCurrent[i];
15110 mem.nCurrent[i]--;
15111 assert( mem.nCurrent[i]>=0 );
15163 mem.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);
15173 mem.mutex = 0;
15219 sqlite3_mutex_enter(mem.mutex);
15220 assert( mem.disallow==0 );
15223 mem.nBacktrace*sizeof(void*) + mem.nTitle;
15227 pBt = (void**)&z[mem.nTitle];
15228 pHdr = (struct MemBlockHdr*)&pBt[mem.nBacktrace];
15230 pHdr->pPrev = mem.pLast;
15231 if( mem.pLast ){
15232 mem.pLast->pNext = pHdr;
15234 mem.pFirst = pHdr;
15236 mem.pLast = pHdr;
15239 pHdr->nBacktraceSlots = mem.nBacktrace;
15240 pHdr->nTitle = mem.nTitle;
15241 if( mem.nBacktrace ){
15243 pHdr->nBacktrace = backtrace(aAddr, mem.nBacktrace+1)-1;
15246 if( mem.xBacktrace ){
15247 mem.xBacktrace(nByte, pHdr->nBacktrace-1, &aAddr[1]);
15252 if( mem.nTitle ){
15253 memcpy(z, mem.zTitle, mem.nTitle);
15263 sqlite3_mutex_leave(mem.mutex);
15275 || mem.mutex!=0 );
15279 sqlite3_mutex_enter(mem.mutex);
15284 assert( mem.pFirst==pHdr );
15285 mem.pFirst = pHdr->pNext;
15291 assert( mem.pLast==pHdr );
15292 mem.pLast = pHdr->pPrev;
15300 sqlite3_mutex_leave(mem.mutex);
15315 assert( mem.disallow==0 );
15412 mem.nBacktrace = depth;
15416 mem.xBacktrace = xBacktrace;
15424 sqlite3_mutex_enter(mem.mutex);
15425 if( n>=sizeof(mem.zTitle) ) n = sizeof(mem.zTitle)-1;
15426 memcpy(mem.zTitle, zTitle, n);
15427 mem.zTitle[n] = 0;
15428 mem.nTitle = ROUND8(n);
15429 sqlite3_mutex_leave(mem.mutex);
15434 for(pHdr=mem.pFirst; pHdr; pHdr=pHdr->pNext){
15437 mem.xBacktrace(pHdr->iSize, pHdr->nBacktrace-1, &pBt[1]);
15456 for(pHdr=mem.pFirst; pHdr; pHdr=pHdr->pNext){
15471 if( mem.nAlloc[i] ){
15473 i*8, mem.nAlloc[i], mem.nCurrent[i], mem.mxCurrent[i]);
15476 if( mem.nAlloc[NCSIZE-1] ){
15478 NCSIZE*8-8, mem.nAlloc[NCSIZE-1],
15479 mem.nCurrent[NCSIZE-1], mem.mxCurrent[NCSIZE-1]);
15491 nTotal += mem.nAlloc[i];
64180 ** external allocations out of mem[p2] and set mem[p2] to be
64182 ** value or convert mem[p2] to a different type.
67435 assert( (u.bf.pMem->flags & MEM_Int)!=0 ); /* mem(P3) holds an integer */
69027 ** or RESTART. Write 1 or 0 into mem[P3] if the checkpoint returns
69029 ** WAL after the checkpoint into mem[P3+1] and the number of pages
69031 ** completes into mem[P3+2]. However on an error, mem[P3+1] and
69032 ** mem[P3+2] are initialized to -1.
74614 int mem = ++pParse->nMem;
74615 testAddr = sqlite3VdbeAddOp1(v, OP_Once, mem);
90108 int mem = ++pParse->nMem;
90113 sqlite3VdbeAddOp4(v, OP_Int64, 0, mem, 0, (char*)pI64, P4_INT64);
90116 sqlite3VdbeAddOp2(v, OP_ResultRow, mem, 1);
94262 ** records the previous output. mem[regPrev] is a flag that is false