pcache1 35459 ext/sqlite3/libsqlite/sqlite3.c if( pcache1.isInit ){ pcache1 35462 ext/sqlite3/libsqlite/sqlite3.c pcache1.szSlot = sz; pcache1 35463 ext/sqlite3/libsqlite/sqlite3.c pcache1.nSlot = pcache1.nFreeSlot = n; pcache1 35464 ext/sqlite3/libsqlite/sqlite3.c pcache1.nReserve = n>90 ? 10 : (n/10 + 1); pcache1 35465 ext/sqlite3/libsqlite/sqlite3.c pcache1.pStart = pBuf; pcache1 35466 ext/sqlite3/libsqlite/sqlite3.c pcache1.pFree = 0; pcache1 35467 ext/sqlite3/libsqlite/sqlite3.c pcache1.bUnderPressure = 0; pcache1 35470 ext/sqlite3/libsqlite/sqlite3.c p->pNext = pcache1.pFree; pcache1 35471 ext/sqlite3/libsqlite/sqlite3.c pcache1.pFree = p; pcache1 35474 ext/sqlite3/libsqlite/sqlite3.c pcache1.pEnd = pBuf; pcache1 35489 ext/sqlite3/libsqlite/sqlite3.c assert( sqlite3_mutex_notheld(pcache1.grp.mutex) ); pcache1 35491 ext/sqlite3/libsqlite/sqlite3.c if( nByte<=pcache1.szSlot ){ pcache1 35492 ext/sqlite3/libsqlite/sqlite3.c sqlite3_mutex_enter(pcache1.mutex); pcache1 35493 ext/sqlite3/libsqlite/sqlite3.c p = (PgHdr1 *)pcache1.pFree; pcache1 35495 ext/sqlite3/libsqlite/sqlite3.c pcache1.pFree = pcache1.pFree->pNext; pcache1 35496 ext/sqlite3/libsqlite/sqlite3.c pcache1.nFreeSlot--; pcache1 35497 ext/sqlite3/libsqlite/sqlite3.c pcache1.bUnderPressure = pcache1.nFreeSlot<pcache1.nReserve; pcache1 35498 ext/sqlite3/libsqlite/sqlite3.c assert( pcache1.nFreeSlot>=0 ); pcache1 35501 ext/sqlite3/libsqlite/sqlite3.c sqlite3_mutex_leave(pcache1.mutex); pcache1 35510 ext/sqlite3/libsqlite/sqlite3.c sqlite3_mutex_enter(pcache1.mutex); pcache1 35512 ext/sqlite3/libsqlite/sqlite3.c sqlite3_mutex_leave(pcache1.mutex); pcache1 35524 ext/sqlite3/libsqlite/sqlite3.c if( p>=pcache1.pStart && p<pcache1.pEnd ){ pcache1 35526 ext/sqlite3/libsqlite/sqlite3.c sqlite3_mutex_enter(pcache1.mutex); pcache1 35529 ext/sqlite3/libsqlite/sqlite3.c pSlot->pNext = pcache1.pFree; pcache1 35530 ext/sqlite3/libsqlite/sqlite3.c pcache1.pFree = pSlot; pcache1 35531 ext/sqlite3/libsqlite/sqlite3.c pcache1.nFreeSlot++; pcache1 35532 ext/sqlite3/libsqlite/sqlite3.c pcache1.bUnderPressure = pcache1.nFreeSlot<pcache1.nReserve; pcache1 35533 ext/sqlite3/libsqlite/sqlite3.c assert( pcache1.nFreeSlot<=pcache1.nSlot ); pcache1 35534 ext/sqlite3/libsqlite/sqlite3.c sqlite3_mutex_leave(pcache1.mutex); pcache1 35540 ext/sqlite3/libsqlite/sqlite3.c sqlite3_mutex_enter(pcache1.mutex); pcache1 35542 ext/sqlite3/libsqlite/sqlite3.c sqlite3_mutex_leave(pcache1.mutex); pcache1 35552 ext/sqlite3/libsqlite/sqlite3.c if( p>=pcache1.pStart && p<pcache1.pEnd ){ pcache1 35553 ext/sqlite3/libsqlite/sqlite3.c return pcache1.szSlot; pcache1 35634 ext/sqlite3/libsqlite/sqlite3.c if( pcache1.nSlot && pCache->szPage<=pcache1.szSlot ){ pcache1 35635 ext/sqlite3/libsqlite/sqlite3.c return pcache1.bUnderPressure; pcache1 35798 ext/sqlite3/libsqlite/sqlite3.c assert( pcache1.isInit==0 ); pcache1 35799 ext/sqlite3/libsqlite/sqlite3.c memset(&pcache1, 0, sizeof(pcache1)); pcache1 35801 ext/sqlite3/libsqlite/sqlite3.c pcache1.grp.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_LRU); pcache1 35802 ext/sqlite3/libsqlite/sqlite3.c pcache1.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_PMEM); pcache1 35804 ext/sqlite3/libsqlite/sqlite3.c pcache1.grp.mxPinned = 10; pcache1 35805 ext/sqlite3/libsqlite/sqlite3.c pcache1.isInit = 1; pcache1 35816 ext/sqlite3/libsqlite/sqlite3.c assert( pcache1.isInit!=0 ); pcache1 35817 ext/sqlite3/libsqlite/sqlite3.c memset(&pcache1, 0, sizeof(pcache1)); pcache1 35856 ext/sqlite3/libsqlite/sqlite3.c pGroup = &pcache1.grp; pcache1 36206 ext/sqlite3/libsqlite/sqlite3.c assert( sqlite3_mutex_notheld(pcache1.grp.mutex) ); pcache1 36207 ext/sqlite3/libsqlite/sqlite3.c assert( sqlite3_mutex_notheld(pcache1.mutex) ); pcache1 36208 ext/sqlite3/libsqlite/sqlite3.c if( pcache1.pStart==0 ){ pcache1 36210 ext/sqlite3/libsqlite/sqlite3.c pcache1EnterMutex(&pcache1.grp); pcache1 36211 ext/sqlite3/libsqlite/sqlite3.c while( (nReq<0 || nFree<nReq) && ((p=pcache1.grp.pLruTail)!=0) ){ pcache1 36217 ext/sqlite3/libsqlite/sqlite3.c pcache1LeaveMutex(&pcache1.grp); pcache1 36236 ext/sqlite3/libsqlite/sqlite3.c for(p=pcache1.grp.pLruHead; p; p=p->pLruNext){ pcache1 36239 ext/sqlite3/libsqlite/sqlite3.c *pnCurrent = pcache1.grp.nCurrentPage; pcache1 36240 ext/sqlite3/libsqlite/sqlite3.c *pnMax = pcache1.grp.nMaxPage; pcache1 36241 ext/sqlite3/libsqlite/sqlite3.c *pnMin = pcache1.grp.nMinPage;