mem0             18083 ext/sqlite3/libsqlite/sqlite3.c } mem0 = { 0, 0, 0, 0, 0, 0, 0, 0 };
mem0             18085 ext/sqlite3/libsqlite/sqlite3.c #define mem0 GLOBAL(struct Mem0Global, mem0)
mem0             18110 ext/sqlite3/libsqlite/sqlite3.c   sqlite3_mutex_enter(mem0.mutex);
mem0             18111 ext/sqlite3/libsqlite/sqlite3.c   mem0.alarmCallback = xCallback;
mem0             18112 ext/sqlite3/libsqlite/sqlite3.c   mem0.alarmArg = pArg;
mem0             18113 ext/sqlite3/libsqlite/sqlite3.c   mem0.alarmThreshold = iThreshold;
mem0             18115 ext/sqlite3/libsqlite/sqlite3.c   mem0.nearlyFull = (iThreshold>0 && iThreshold<=nUsed);
mem0             18116 ext/sqlite3/libsqlite/sqlite3.c   sqlite3_mutex_leave(mem0.mutex);
mem0             18144 ext/sqlite3/libsqlite/sqlite3.c   sqlite3_mutex_enter(mem0.mutex);
mem0             18145 ext/sqlite3/libsqlite/sqlite3.c   priorLimit = mem0.alarmThreshold;
mem0             18146 ext/sqlite3/libsqlite/sqlite3.c   sqlite3_mutex_leave(mem0.mutex);
mem0             18169 ext/sqlite3/libsqlite/sqlite3.c   memset(&mem0, 0, sizeof(mem0));
mem0             18171 ext/sqlite3/libsqlite/sqlite3.c     mem0.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);
mem0             18181 ext/sqlite3/libsqlite/sqlite3.c     mem0.pScratchFree = pSlot;
mem0             18182 ext/sqlite3/libsqlite/sqlite3.c     mem0.nScratchFree = n;
mem0             18188 ext/sqlite3/libsqlite/sqlite3.c     mem0.pScratchEnd = (void*)&pSlot[1];
mem0             18190 ext/sqlite3/libsqlite/sqlite3.c     mem0.pScratchEnd = 0;
mem0             18210 ext/sqlite3/libsqlite/sqlite3.c   return mem0.nearlyFull;
mem0             18220 ext/sqlite3/libsqlite/sqlite3.c   memset(&mem0, 0, sizeof(mem0));
mem0             18254 ext/sqlite3/libsqlite/sqlite3.c   if( mem0.alarmCallback==0 ) return;
mem0             18255 ext/sqlite3/libsqlite/sqlite3.c   xCallback = mem0.alarmCallback;
mem0             18257 ext/sqlite3/libsqlite/sqlite3.c   pArg = mem0.alarmArg;
mem0             18258 ext/sqlite3/libsqlite/sqlite3.c   mem0.alarmCallback = 0;
mem0             18259 ext/sqlite3/libsqlite/sqlite3.c   sqlite3_mutex_leave(mem0.mutex);
mem0             18261 ext/sqlite3/libsqlite/sqlite3.c   sqlite3_mutex_enter(mem0.mutex);
mem0             18262 ext/sqlite3/libsqlite/sqlite3.c   mem0.alarmCallback = xCallback;
mem0             18263 ext/sqlite3/libsqlite/sqlite3.c   mem0.alarmArg = pArg;
mem0             18273 ext/sqlite3/libsqlite/sqlite3.c   assert( sqlite3_mutex_held(mem0.mutex) );
mem0             18276 ext/sqlite3/libsqlite/sqlite3.c   if( mem0.alarmCallback!=0 ){
mem0             18278 ext/sqlite3/libsqlite/sqlite3.c     if( nUsed >= mem0.alarmThreshold - nFull ){
mem0             18279 ext/sqlite3/libsqlite/sqlite3.c       mem0.nearlyFull = 1;
mem0             18282 ext/sqlite3/libsqlite/sqlite3.c       mem0.nearlyFull = 0;
mem0             18287 ext/sqlite3/libsqlite/sqlite3.c   if( p==0 && mem0.alarmCallback ){
mem0             18317 ext/sqlite3/libsqlite/sqlite3.c     sqlite3_mutex_enter(mem0.mutex);
mem0             18319 ext/sqlite3/libsqlite/sqlite3.c     sqlite3_mutex_leave(mem0.mutex);
mem0             18362 ext/sqlite3/libsqlite/sqlite3.c   sqlite3_mutex_enter(mem0.mutex);
mem0             18363 ext/sqlite3/libsqlite/sqlite3.c   if( mem0.nScratchFree && sqlite3GlobalConfig.szScratch>=n ){
mem0             18364 ext/sqlite3/libsqlite/sqlite3.c     p = mem0.pScratchFree;
mem0             18365 ext/sqlite3/libsqlite/sqlite3.c     mem0.pScratchFree = mem0.pScratchFree->pNext;
mem0             18366 ext/sqlite3/libsqlite/sqlite3.c     mem0.nScratchFree--;
mem0             18369 ext/sqlite3/libsqlite/sqlite3.c     sqlite3_mutex_leave(mem0.mutex);
mem0             18375 ext/sqlite3/libsqlite/sqlite3.c       sqlite3_mutex_leave(mem0.mutex);
mem0             18377 ext/sqlite3/libsqlite/sqlite3.c       sqlite3_mutex_leave(mem0.mutex);
mem0             18382 ext/sqlite3/libsqlite/sqlite3.c   assert( sqlite3_mutex_notheld(mem0.mutex) );
mem0             18408 ext/sqlite3/libsqlite/sqlite3.c     if( p>=sqlite3GlobalConfig.pScratch && p<mem0.pScratchEnd ){
mem0             18412 ext/sqlite3/libsqlite/sqlite3.c       sqlite3_mutex_enter(mem0.mutex);
mem0             18413 ext/sqlite3/libsqlite/sqlite3.c       pSlot->pNext = mem0.pScratchFree;
mem0             18414 ext/sqlite3/libsqlite/sqlite3.c       mem0.pScratchFree = pSlot;
mem0             18415 ext/sqlite3/libsqlite/sqlite3.c       mem0.nScratchFree++;
mem0             18416 ext/sqlite3/libsqlite/sqlite3.c       assert( mem0.nScratchFree <= (u32)sqlite3GlobalConfig.nScratch );
mem0             18418 ext/sqlite3/libsqlite/sqlite3.c       sqlite3_mutex_leave(mem0.mutex);
mem0             18426 ext/sqlite3/libsqlite/sqlite3.c         sqlite3_mutex_enter(mem0.mutex);
mem0             18431 ext/sqlite3/libsqlite/sqlite3.c         sqlite3_mutex_leave(mem0.mutex);
mem0             18479 ext/sqlite3/libsqlite/sqlite3.c     sqlite3_mutex_enter(mem0.mutex);
mem0             18483 ext/sqlite3/libsqlite/sqlite3.c     sqlite3_mutex_leave(mem0.mutex);
mem0             18540 ext/sqlite3/libsqlite/sqlite3.c     sqlite3_mutex_enter(mem0.mutex);
mem0             18544 ext/sqlite3/libsqlite/sqlite3.c           mem0.alarmThreshold-nDiff ){
mem0             18550 ext/sqlite3/libsqlite/sqlite3.c     if( pNew==0 && mem0.alarmCallback ){
mem0             18558 ext/sqlite3/libsqlite/sqlite3.c     sqlite3_mutex_leave(mem0.mutex);