• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt/router/sqlite/

Lines Matching refs:mem0

13754 /************** Begin file mem0.c ********************************************/
13814 /************** End of mem0.c ************************************************/
17172 ** The alarm callback and its arguments. The mem0.mutex lock will
17188 } mem0 = { 0, 0, 0, 0, 0, 0, 0, 0 };
17190 #define mem0 GLOBAL(struct Mem0Global, mem0)
17199 memset(&mem0, 0, sizeof(mem0));
17201 mem0.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);
17207 mem0.aScratchFree = (u32*)&((char*)sqlite3GlobalConfig.pScratch)
17209 for(i=0; i<sqlite3GlobalConfig.nScratch; i++){ mem0.aScratchFree[i] = i; }
17210 mem0.nScratchFree = sqlite3GlobalConfig.nScratch;
17223 mem0.aPageFree = (u32*)&((char*)sqlite3GlobalConfig.pPage)
17225 for(i=0; i<sqlite3GlobalConfig.nPage; i++){ mem0.aPageFree[i] = i; }
17226 mem0.nPageFree = sqlite3GlobalConfig.nPage;
17241 memset(&mem0, 0, sizeof(mem0));
17276 sqlite3_mutex_enter(mem0.mutex);
17277 mem0.alarmCallback = xCallback;
17278 mem0.alarmArg = pArg;
17279 mem0.alarmThreshold = iThreshold;
17280 sqlite3_mutex_leave(mem0.mutex);
17305 if( mem0.alarmCallback==0 ) return;
17306 xCallback = mem0.alarmCallback;
17308 pArg = mem0.alarmArg;
17309 mem0.alarmCallback = 0;
17310 sqlite3_mutex_leave(mem0.mutex);
17312 sqlite3_mutex_enter(mem0.mutex);
17313 mem0.alarmCallback = xCallback;
17314 mem0.alarmArg = pArg;
17324 assert( sqlite3_mutex_held(mem0.mutex) );
17327 if( mem0.alarmCallback!=0 ){
17329 if( nUsed+nFull >= mem0.alarmThreshold ){
17334 if( p==0 && mem0.alarmCallback ){
17361 sqlite3_mutex_enter(mem0.mutex);
17363 sqlite3_mutex_leave(mem0.mutex);
17416 sqlite3_mutex_enter(mem0.mutex);
17417 if( mem0.nScratchFree==0 ){
17418 sqlite3_mutex_leave(mem0.mutex);
17422 i = mem0.aScratchFree[--mem0.nScratchFree];
17426 sqlite3_mutex_leave(mem0.mutex);
17439 sqlite3_mutex_enter(mem0.mutex);
17443 sqlite3_mutex_leave(mem0.mutex);
17457 || p>=(void*)mem0.aScratchFree ){
17463 sqlite3_mutex_enter(mem0.mutex);
17468 sqlite3_mutex_leave(mem0.mutex);
17477 sqlite3_mutex_enter(mem0.mutex);
17478 assert( mem0.nScratchFree<(u32)sqlite3GlobalConfig.nScratch );
17479 mem0.aScratchFree[mem0.nScratchFree++] = i;
17481 sqlite3_mutex_leave(mem0.mutex);
17536 sqlite3_mutex_enter(mem0.mutex);
17540 sqlite3_mutex_leave(mem0.mutex);
17594 sqlite3_mutex_enter(mem0.mutex);
17597 mem0.alarmThreshold ){
17603 if( pNew==0 && mem0.alarmCallback ){
17611 sqlite3_mutex_leave(mem0.mutex);