Lines Matching refs:pGroup
40015 PGroup *pGroup; /* PGroup this cache belongs to */
40232 assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
40233 pcache1LeaveMutex(pCache->pGroup);
40246 pcache1EnterMutex(pCache->pGroup);
40252 pCache->pGroup->nCurrentPage++;
40269 assert( sqlite3_mutex_held(p->pCache->pGroup->mutex) );
40275 pCache->pGroup->nCurrentPage--;
40335 assert( sqlite3_mutex_held(p->pGroup->mutex) );
40342 pcache1LeaveMutex(p->pGroup);
40346 pcache1EnterMutex(p->pGroup);
40373 PGroup *pGroup;
40378 pGroup = pCache->pGroup;
40379 assert( pPage->pLruNext || pPage==pGroup->pLruTail );
40380 assert( pPage->pLruPrev || pPage==pGroup->pLruHead );
40381 assert( sqlite3_mutex_held(pGroup->mutex) );
40385 pGroup->pLruHead = pPage->pLruNext;
40390 pGroup->pLruTail = pPage->pLruPrev;
40410 assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
40422 static void pcache1EnforceMaxPage(PGroup *pGroup){
40423 assert( sqlite3_mutex_held(pGroup->mutex) );
40424 while( pGroup->nCurrentPage>pGroup->nMaxPage && pGroup->pLruTail ){
40425 PgHdr1 *p = pGroup->pLruTail;
40426 assert( p->pCache->pGroup==pGroup );
40447 assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
40506 PGroup *pGroup; /* The group the new page cache will belong to */
40534 pGroup = (PGroup*)&pCache[1];
40535 pGroup->mxPinned = 10;
40537 pGroup = &pcache1.grp;
40539 pCache->pGroup = pGroup;
40543 pcache1EnterMutex(pGroup);
40547 pGroup->nMinPage += pCache->nMin;
40548 pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
40550 pcache1LeaveMutex(pGroup);
40567 PGroup *pGroup = pCache->pGroup;
40568 pcache1EnterMutex(pGroup);
40569 pGroup->nMaxPage += (nMax - pCache->nMax);
40570 pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
40573 pcache1EnforceMaxPage(pGroup);
40574 pcache1LeaveMutex(pGroup);
40586 PGroup *pGroup = pCache->pGroup;
40588 pcache1EnterMutex(pGroup);
40589 savedMaxPage = pGroup->nMaxPage;
40590 pGroup->nMaxPage = 0;
40591 pcache1EnforceMaxPage(pGroup);
40592 pGroup->nMaxPage = savedMaxPage;
40593 pcache1LeaveMutex(pGroup);
40603 pcache1EnterMutex(pCache->pGroup);
40605 pcache1LeaveMutex(pCache->pGroup);
40624 PGroup *pGroup = pCache->pGroup;
40630 assert( pGroup->mxPinned == pGroup->nMaxPage + 10 - pGroup->nMinPage );
40633 nPinned>=pGroup->mxPinned
40644 if( pCache->bPurgeable && pGroup->pLruTail && (
40646 || pGroup->nCurrentPage>=pGroup->nMaxPage
40650 pPage = pGroup->pLruTail;
40667 pGroup->nCurrentPage -= (pOther->bPurgeable - pCache->bPurgeable);
40766 pcache1EnterMutex(pCache->pGroup);
40780 pcache1LeaveMutex(pCache->pGroup);
40797 PGroup *pGroup = pCache->pGroup;
40800 pcache1EnterMutex(pGroup);
40806 assert( pGroup->pLruHead!=pPage && pGroup->pLruTail!=pPage );
40809 if( reuseUnlikely || pGroup->nCurrentPage>pGroup->nMaxPage ){
40814 if( pGroup->pLruHead ){
40815 pGroup->pLruHead->pLruPrev = pPage;
40816 pPage->pLruNext = pGroup->pLruHead;
40817 pGroup->pLruHead = pPage;
40819 pGroup->pLruTail = pPage;
40820 pGroup->pLruHead = pPage;
40826 pcache1LeaveMutex(pCache->pGroup);
40845 pcache1EnterMutex(pCache->pGroup);
40862 pcache1LeaveMutex(pCache->pGroup);
40874 pcache1EnterMutex(pCache->pGroup);
40879 pcache1LeaveMutex(pCache->pGroup);
40889 PGroup *pGroup = pCache->pGroup;
40891 pcache1EnterMutex(pGroup);
40893 assert( pGroup->nMaxPage >= pCache->nMax );
40894 pGroup->nMaxPage -= pCache->nMax;
40895 assert( pGroup->nMinPage >= pCache->nMin );
40896 pGroup->nMinPage -= pCache->nMin;
40897 pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
40898 pcache1EnforceMaxPage(pGroup);
40899 pcache1LeaveMutex(pGroup);