Lines Matching defs:mem

25837 ** into a single structure named "mem".  This is to keep the
25882 } mem;
25894 mem.nAlloc[i]++;
25895 mem.nCurrent[i]++;
25896 if( mem.nCurrent[i]>mem.mxCurrent[i] ){
25897 mem.mxCurrent[i] = mem.nCurrent[i];
25900 mem.nCurrent[i]--;
25901 assert( mem.nCurrent[i]>=0 );
25953 mem.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);
25963 mem.mutex = 0;
26009 sqlite3_mutex_enter(mem.mutex);
26010 assert( mem.disallow==0 );
26013 mem.nBacktrace*sizeof(void*) + mem.nTitle;
26017 pBt = (void**)&z[mem.nTitle];
26018 pHdr = (struct MemBlockHdr*)&pBt[mem.nBacktrace];
26020 pHdr->pPrev = mem.pLast;
26021 if( mem.pLast ){
26022 mem.pLast->pNext = pHdr;
26024 mem.pFirst = pHdr;
26026 mem.pLast = pHdr;
26029 pHdr->nBacktraceSlots = mem.nBacktrace;
26030 pHdr->nTitle = mem.nTitle;
26031 if( mem.nBacktrace ){
26033 pHdr->nBacktrace = backtrace(aAddr, mem.nBacktrace+1)-1;
26036 if( mem.xBacktrace ){
26037 mem.xBacktrace(nByte, pHdr->nBacktrace-1, &aAddr[1]);
26042 if( mem.nTitle ){
26043 memcpy(z, mem.zTitle, mem.nTitle);
26053 sqlite3_mutex_leave(mem.mutex);
26065 || mem.mutex!=0 );
26069 sqlite3_mutex_enter(mem.mutex);
26074 assert( mem.pFirst==pHdr );
26075 mem.pFirst = pHdr->pNext;
26081 assert( mem.pLast==pHdr );
26082 mem.pLast = pHdr->pPrev;
26090 sqlite3_mutex_leave(mem.mutex);
26105 assert( mem.disallow==0 );
26202 mem.nBacktrace = depth;
26206 mem.xBacktrace = xBacktrace;
26214 sqlite3_mutex_enter(mem.mutex);
26215 if( n>=sizeof(mem.zTitle) ) n = sizeof(mem.zTitle)-1;
26216 memcpy(mem.zTitle, zTitle, n);
26217 mem.zTitle[n] = 0;
26218 mem.nTitle = ROUND8(n);
26219 sqlite3_mutex_leave(mem.mutex);
26224 for(pHdr=mem.pFirst; pHdr; pHdr=pHdr->pNext){
26227 mem.xBacktrace((int)pHdr->iSize, pHdr->nBacktrace-1, &pBt[1]);
26246 for(pHdr=mem.pFirst; pHdr; pHdr=pHdr->pNext){
26261 if( mem.nAlloc[i] ){
26263 i*8, mem.nAlloc[i], mem.nCurrent[i], mem.mxCurrent[i]);
26266 if( mem.nAlloc[NCSIZE-1] ){
26268 NCSIZE*8-8, mem.nAlloc[NCSIZE-1],
26269 mem.nCurrent[NCSIZE-1], mem.mxCurrent[NCSIZE-1]);
26281 nTotal += mem.nAlloc[i];
51811 ** Open an mem file handle.
95820 assert( (pMem->flags & MEM_Int)!=0 ); /* mem(P3) holds an integer */
98006 ** RESTART, or TRUNCATE. Write 1 or 0 into mem[P3] if the checkpoint returns
98008 ** WAL after the checkpoint into mem[P3+1] and the number of pages
98010 ** completes into mem[P3+2]. However on an error, mem[P3+1] and
98011 ** mem[P3+2] are initialized to -1.
141430 ** records the previous output. mem[regPrev] is a flag that is false
244364 "reprep,run,mem)");
245312 sqlite3_log(SQLITE_NOMEM, "codec: alloc mem failed when set cipher page size(%d).", size);