pcache1 35094 third_party/sqlite/amalgamation/sqlite3.c if( pcache1.isInit ){ pcache1 35097 third_party/sqlite/amalgamation/sqlite3.c pcache1.szSlot = sz; pcache1 35098 third_party/sqlite/amalgamation/sqlite3.c pcache1.nSlot = pcache1.nFreeSlot = n; pcache1 35099 third_party/sqlite/amalgamation/sqlite3.c pcache1.nReserve = n>90 ? 10 : (n/10 + 1); pcache1 35100 third_party/sqlite/amalgamation/sqlite3.c pcache1.pStart = pBuf; pcache1 35101 third_party/sqlite/amalgamation/sqlite3.c pcache1.pFree = 0; pcache1 35102 third_party/sqlite/amalgamation/sqlite3.c pcache1.bUnderPressure = 0; pcache1 35105 third_party/sqlite/amalgamation/sqlite3.c p->pNext = pcache1.pFree; pcache1 35106 third_party/sqlite/amalgamation/sqlite3.c pcache1.pFree = p; pcache1 35109 third_party/sqlite/amalgamation/sqlite3.c pcache1.pEnd = pBuf; pcache1 35124 third_party/sqlite/amalgamation/sqlite3.c assert( sqlite3_mutex_notheld(pcache1.grp.mutex) ); pcache1 35126 third_party/sqlite/amalgamation/sqlite3.c if( nByte<=pcache1.szSlot ){ pcache1 35127 third_party/sqlite/amalgamation/sqlite3.c sqlite3_mutex_enter(pcache1.mutex); pcache1 35128 third_party/sqlite/amalgamation/sqlite3.c p = (PgHdr1 *)pcache1.pFree; pcache1 35130 third_party/sqlite/amalgamation/sqlite3.c pcache1.pFree = pcache1.pFree->pNext; pcache1 35131 third_party/sqlite/amalgamation/sqlite3.c pcache1.nFreeSlot--; pcache1 35132 third_party/sqlite/amalgamation/sqlite3.c pcache1.bUnderPressure = pcache1.nFreeSlot<pcache1.nReserve; pcache1 35133 third_party/sqlite/amalgamation/sqlite3.c assert( pcache1.nFreeSlot>=0 ); pcache1 35136 third_party/sqlite/amalgamation/sqlite3.c sqlite3_mutex_leave(pcache1.mutex); pcache1 35145 third_party/sqlite/amalgamation/sqlite3.c sqlite3_mutex_enter(pcache1.mutex); pcache1 35147 third_party/sqlite/amalgamation/sqlite3.c sqlite3_mutex_leave(pcache1.mutex); pcache1 35159 third_party/sqlite/amalgamation/sqlite3.c if( p>=pcache1.pStart && p<pcache1.pEnd ){ pcache1 35161 third_party/sqlite/amalgamation/sqlite3.c sqlite3_mutex_enter(pcache1.mutex); pcache1 35164 third_party/sqlite/amalgamation/sqlite3.c pSlot->pNext = pcache1.pFree; pcache1 35165 third_party/sqlite/amalgamation/sqlite3.c pcache1.pFree = pSlot; pcache1 35166 third_party/sqlite/amalgamation/sqlite3.c pcache1.nFreeSlot++; pcache1 35167 third_party/sqlite/amalgamation/sqlite3.c pcache1.bUnderPressure = pcache1.nFreeSlot<pcache1.nReserve; pcache1 35168 third_party/sqlite/amalgamation/sqlite3.c assert( pcache1.nFreeSlot<=pcache1.nSlot ); pcache1 35169 third_party/sqlite/amalgamation/sqlite3.c sqlite3_mutex_leave(pcache1.mutex); pcache1 35175 third_party/sqlite/amalgamation/sqlite3.c sqlite3_mutex_enter(pcache1.mutex); pcache1 35177 third_party/sqlite/amalgamation/sqlite3.c sqlite3_mutex_leave(pcache1.mutex); pcache1 35187 third_party/sqlite/amalgamation/sqlite3.c if( p>=pcache1.pStart && p<pcache1.pEnd ){ pcache1 35188 third_party/sqlite/amalgamation/sqlite3.c return pcache1.szSlot; pcache1 35269 third_party/sqlite/amalgamation/sqlite3.c if( pcache1.nSlot && pCache->szPage<=pcache1.szSlot ){ pcache1 35270 third_party/sqlite/amalgamation/sqlite3.c return pcache1.bUnderPressure; pcache1 35433 third_party/sqlite/amalgamation/sqlite3.c assert( pcache1.isInit==0 ); pcache1 35434 third_party/sqlite/amalgamation/sqlite3.c memset(&pcache1, 0, sizeof(pcache1)); pcache1 35436 third_party/sqlite/amalgamation/sqlite3.c pcache1.grp.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_LRU); pcache1 35437 third_party/sqlite/amalgamation/sqlite3.c pcache1.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_PMEM); pcache1 35439 third_party/sqlite/amalgamation/sqlite3.c pcache1.grp.mxPinned = 10; pcache1 35440 third_party/sqlite/amalgamation/sqlite3.c pcache1.isInit = 1; pcache1 35451 third_party/sqlite/amalgamation/sqlite3.c assert( pcache1.isInit!=0 ); pcache1 35452 third_party/sqlite/amalgamation/sqlite3.c memset(&pcache1, 0, sizeof(pcache1)); pcache1 35845 third_party/sqlite/amalgamation/sqlite3.c assert( sqlite3_mutex_notheld(pcache1.grp.mutex) ); pcache1 35846 third_party/sqlite/amalgamation/sqlite3.c assert( sqlite3_mutex_notheld(pcache1.mutex) ); pcache1 35847 third_party/sqlite/amalgamation/sqlite3.c if( pcache1.pStart==0 ){ pcache1 35849 third_party/sqlite/amalgamation/sqlite3.c pcache1EnterMutex(&pcache1.grp); pcache1 35850 third_party/sqlite/amalgamation/sqlite3.c while( (nReq<0 || nFree<nReq) && ((p=pcache1.grp.pLruTail)!=0) ){ pcache1 35856 third_party/sqlite/amalgamation/sqlite3.c pcache1LeaveMutex(&pcache1.grp); pcache1 35875 third_party/sqlite/amalgamation/sqlite3.c for(p=pcache1.grp.pLruHead; p; p=p->pLruNext){ pcache1 35878 third_party/sqlite/amalgamation/sqlite3.c *pnCurrent = pcache1.grp.nCurrentPage; pcache1 35879 third_party/sqlite/amalgamation/sqlite3.c *pnMax = pcache1.grp.nMaxPage; pcache1 35880 third_party/sqlite/amalgamation/sqlite3.c *pnMin = pcache1.grp.nMinPage; pcache1 180 third_party/sqlite/src/src/pcache1.c if( pcache1.isInit ){ pcache1 183 third_party/sqlite/src/src/pcache1.c pcache1.szSlot = sz; pcache1 184 third_party/sqlite/src/src/pcache1.c pcache1.nSlot = pcache1.nFreeSlot = n; pcache1 185 third_party/sqlite/src/src/pcache1.c pcache1.nReserve = n>90 ? 10 : (n/10 + 1); pcache1 186 third_party/sqlite/src/src/pcache1.c pcache1.pStart = pBuf; pcache1 187 third_party/sqlite/src/src/pcache1.c pcache1.pFree = 0; pcache1 188 third_party/sqlite/src/src/pcache1.c pcache1.bUnderPressure = 0; pcache1 191 third_party/sqlite/src/src/pcache1.c p->pNext = pcache1.pFree; pcache1 192 third_party/sqlite/src/src/pcache1.c pcache1.pFree = p; pcache1 195 third_party/sqlite/src/src/pcache1.c pcache1.pEnd = pBuf; pcache1 210 third_party/sqlite/src/src/pcache1.c assert( sqlite3_mutex_notheld(pcache1.grp.mutex) ); pcache1 212 third_party/sqlite/src/src/pcache1.c if( nByte<=pcache1.szSlot ){ pcache1 213 third_party/sqlite/src/src/pcache1.c sqlite3_mutex_enter(pcache1.mutex); pcache1 214 third_party/sqlite/src/src/pcache1.c p = (PgHdr1 *)pcache1.pFree; pcache1 216 third_party/sqlite/src/src/pcache1.c pcache1.pFree = pcache1.pFree->pNext; pcache1 217 third_party/sqlite/src/src/pcache1.c pcache1.nFreeSlot--; pcache1 218 third_party/sqlite/src/src/pcache1.c pcache1.bUnderPressure = pcache1.nFreeSlot<pcache1.nReserve; pcache1 219 third_party/sqlite/src/src/pcache1.c assert( pcache1.nFreeSlot>=0 ); pcache1 222 third_party/sqlite/src/src/pcache1.c sqlite3_mutex_leave(pcache1.mutex); pcache1 231 third_party/sqlite/src/src/pcache1.c sqlite3_mutex_enter(pcache1.mutex); pcache1 233 third_party/sqlite/src/src/pcache1.c sqlite3_mutex_leave(pcache1.mutex); pcache1 245 third_party/sqlite/src/src/pcache1.c if( p>=pcache1.pStart && p<pcache1.pEnd ){ pcache1 247 third_party/sqlite/src/src/pcache1.c sqlite3_mutex_enter(pcache1.mutex); pcache1 250 third_party/sqlite/src/src/pcache1.c pSlot->pNext = pcache1.pFree; pcache1 251 third_party/sqlite/src/src/pcache1.c pcache1.pFree = pSlot; pcache1 252 third_party/sqlite/src/src/pcache1.c pcache1.nFreeSlot++; pcache1 253 third_party/sqlite/src/src/pcache1.c pcache1.bUnderPressure = pcache1.nFreeSlot<pcache1.nReserve; pcache1 254 third_party/sqlite/src/src/pcache1.c assert( pcache1.nFreeSlot<=pcache1.nSlot ); pcache1 255 third_party/sqlite/src/src/pcache1.c sqlite3_mutex_leave(pcache1.mutex); pcache1 261 third_party/sqlite/src/src/pcache1.c sqlite3_mutex_enter(pcache1.mutex); pcache1 263 third_party/sqlite/src/src/pcache1.c sqlite3_mutex_leave(pcache1.mutex); pcache1 273 third_party/sqlite/src/src/pcache1.c if( p>=pcache1.pStart && p<pcache1.pEnd ){ pcache1 274 third_party/sqlite/src/src/pcache1.c return pcache1.szSlot; pcache1 355 third_party/sqlite/src/src/pcache1.c if( pcache1.nSlot && pCache->szPage<=pcache1.szSlot ){ pcache1 356 third_party/sqlite/src/src/pcache1.c return pcache1.bUnderPressure; pcache1 519 third_party/sqlite/src/src/pcache1.c assert( pcache1.isInit==0 ); pcache1 520 third_party/sqlite/src/src/pcache1.c memset(&pcache1, 0, sizeof(pcache1)); pcache1 522 third_party/sqlite/src/src/pcache1.c pcache1.grp.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_LRU); pcache1 523 third_party/sqlite/src/src/pcache1.c pcache1.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_PMEM); pcache1 525 third_party/sqlite/src/src/pcache1.c pcache1.grp.mxPinned = 10; pcache1 526 third_party/sqlite/src/src/pcache1.c pcache1.isInit = 1; pcache1 537 third_party/sqlite/src/src/pcache1.c assert( pcache1.isInit!=0 ); pcache1 538 third_party/sqlite/src/src/pcache1.c memset(&pcache1, 0, sizeof(pcache1)); pcache1 931 third_party/sqlite/src/src/pcache1.c assert( sqlite3_mutex_notheld(pcache1.grp.mutex) ); pcache1 932 third_party/sqlite/src/src/pcache1.c assert( sqlite3_mutex_notheld(pcache1.mutex) ); pcache1 933 third_party/sqlite/src/src/pcache1.c if( pcache1.pStart==0 ){ pcache1 935 third_party/sqlite/src/src/pcache1.c pcache1EnterMutex(&pcache1.grp); pcache1 936 third_party/sqlite/src/src/pcache1.c while( (nReq<0 || nFree<nReq) && ((p=pcache1.grp.pLruTail)!=0) ){ pcache1 942 third_party/sqlite/src/src/pcache1.c pcache1LeaveMutex(&pcache1.grp); pcache1 961 third_party/sqlite/src/src/pcache1.c for(p=pcache1.grp.pLruHead; p; p=p->pLruNext){ pcache1 964 third_party/sqlite/src/src/pcache1.c *pnCurrent = pcache1.grp.nCurrentPage; pcache1 965 third_party/sqlite/src/src/pcache1.c *pnMax = pcache1.grp.nMaxPage; pcache1 966 third_party/sqlite/src/src/pcache1.c *pnMin = pcache1.grp.nMinPage;