• Home
  • Raw
  • Download

Lines Matching refs:mem0

29092 } mem0 = { 0, SQLITE_MAX_MEMORY, SQLITE_MAX_MEMORY, 0 };
29094 #define mem0 GLOBAL(struct Mem0Global, mem0)
29100 return mem0.mutex;
29140 sqlite3_mutex_enter(mem0.mutex);
29141 priorLimit = mem0.alarmThreshold;
29143 sqlite3_mutex_leave(mem0.mutex);
29146 if( mem0.hardLimit>0 && (n>mem0.hardLimit || n==0) ){
29147 n = mem0.hardLimit;
29149 mem0.alarmThreshold = n;
29151 AtomicStore(&mem0.nearlyFull, n>0 && n<=nUsed);
29152 sqlite3_mutex_leave(mem0.mutex);
29180 sqlite3_mutex_enter(mem0.mutex);
29181 priorLimit = mem0.hardLimit;
29183 mem0.hardLimit = n;
29184 if( n<mem0.alarmThreshold || mem0.alarmThreshold==0 ){
29185 mem0.alarmThreshold = n;
29188 sqlite3_mutex_leave(mem0.mutex);
29201 mem0.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);
29208 if( rc!=SQLITE_OK ) memset(&mem0, 0, sizeof(mem0));
29218 return AtomicLoad(&mem0.nearlyFull);
29228 memset(&mem0, 0, sizeof(mem0));
29255 if( mem0.alarmThreshold<=0 ) return;
29256 sqlite3_mutex_leave(mem0.mutex);
29258 sqlite3_mutex_enter(mem0.mutex);
29268 assert( sqlite3_mutex_held(mem0.mutex) );
29279 if( mem0.alarmThreshold>0 ){
29281 if( nUsed >= mem0.alarmThreshold - nFull ){
29282 AtomicStore(&mem0.nearlyFull, 1);
29284 if( mem0.hardLimit ){
29286 if( nUsed >= mem0.hardLimit - nFull ){
29292 AtomicStore(&mem0.nearlyFull, 0);
29297 if( p==0 && mem0.alarmThreshold>0 ){
29340 sqlite3_mutex_enter(mem0.mutex);
29342 sqlite3_mutex_leave(mem0.mutex);
29435 sqlite3_mutex_enter(mem0.mutex);
29439 sqlite3_mutex_leave(mem0.mutex);
29567 sqlite3_mutex_enter(mem0.mutex);
29571 mem0.alarmThreshold-nDiff ){
29573 if( mem0.hardLimit>0 && nUsed >= mem0.hardLimit - nDiff ){
29574 sqlite3_mutex_leave(mem0.mutex);
29580 if( pNew==0 && mem0.alarmThreshold>0 ){
29589 sqlite3_mutex_leave(mem0.mutex);