Lines Matching refs:mem0
25187 } mem0 = { 0, 0, 0 };
25189 #define mem0 GLOBAL(struct Mem0Global, mem0)
25195 return mem0.mutex;
25228 sqlite3_mutex_enter(mem0.mutex);
25229 priorLimit = mem0.alarmThreshold;
25231 sqlite3_mutex_leave(mem0.mutex);
25234 mem0.alarmThreshold = n;
25236 mem0.nearlyFull = (n>0 && n<=nUsed);
25237 sqlite3_mutex_leave(mem0.mutex);
25255 memset(&mem0, 0, sizeof(mem0));
25256 mem0.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);
25263 if( rc!=SQLITE_OK ) memset(&mem0, 0, sizeof(mem0));
25273 return mem0.nearlyFull;
25283 memset(&mem0, 0, sizeof(mem0));
25310 if( mem0.alarmThreshold<=0 ) return;
25311 sqlite3_mutex_leave(mem0.mutex);
25313 sqlite3_mutex_enter(mem0.mutex);
25323 assert( sqlite3_mutex_held(mem0.mutex) );
25341 if( mem0.alarmThreshold>0 ){
25343 if( nUsed >= mem0.alarmThreshold - nFull ){
25344 mem0.nearlyFull = 1;
25347 mem0.nearlyFull = 0;
25352 if( p==0 && mem0.alarmThreshold>0 ){
25379 sqlite3_mutex_enter(mem0.mutex);
25381 sqlite3_mutex_leave(mem0.mutex);
25458 sqlite3_mutex_enter(mem0.mutex);
25462 sqlite3_mutex_leave(mem0.mutex);
25538 sqlite3_mutex_enter(mem0.mutex);
25542 mem0.alarmThreshold-nDiff ){
25546 if( pNew==0 && mem0.alarmThreshold>0 ){
25554 sqlite3_mutex_leave(mem0.mutex);