Lines Matching refs:pGroup
39997 PGroup *pGroup; /* PGroup this cache belongs to */
40214 assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
40215 pcache1LeaveMutex(pCache->pGroup);
40228 pcache1EnterMutex(pCache->pGroup);
40234 pCache->pGroup->nCurrentPage++;
40251 assert( sqlite3_mutex_held(p->pCache->pGroup->mutex) );
40257 pCache->pGroup->nCurrentPage--;
40317 assert( sqlite3_mutex_held(p->pGroup->mutex) );
40324 pcache1LeaveMutex(p->pGroup);
40328 pcache1EnterMutex(p->pGroup);
40355 PGroup *pGroup;
40360 pGroup = pCache->pGroup;
40361 assert( pPage->pLruNext || pPage==pGroup->pLruTail );
40362 assert( pPage->pLruPrev || pPage==pGroup->pLruHead );
40363 assert( sqlite3_mutex_held(pGroup->mutex) );
40367 pGroup->pLruHead = pPage->pLruNext;
40372 pGroup->pLruTail = pPage->pLruPrev;
40392 assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
40404 static void pcache1EnforceMaxPage(PGroup *pGroup){
40405 assert( sqlite3_mutex_held(pGroup->mutex) );
40406 while( pGroup->nCurrentPage>pGroup->nMaxPage && pGroup->pLruTail ){
40407 PgHdr1 *p = pGroup->pLruTail;
40408 assert( p->pCache->pGroup==pGroup );
40429 assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
40488 PGroup *pGroup; /* The group the new page cache will belong to */
40516 pGroup = (PGroup*)&pCache[1];
40517 pGroup->mxPinned = 10;
40519 pGroup = &pcache1.grp;
40521 pCache->pGroup = pGroup;
40525 pcache1EnterMutex(pGroup);
40529 pGroup->nMinPage += pCache->nMin;
40530 pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
40532 pcache1LeaveMutex(pGroup);
40549 PGroup *pGroup = pCache->pGroup;
40550 pcache1EnterMutex(pGroup);
40551 pGroup->nMaxPage += (nMax - pCache->nMax);
40552 pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
40555 pcache1EnforceMaxPage(pGroup);
40556 pcache1LeaveMutex(pGroup);
40568 PGroup *pGroup = pCache->pGroup;
40570 pcache1EnterMutex(pGroup);
40571 savedMaxPage = pGroup->nMaxPage;
40572 pGroup->nMaxPage = 0;
40573 pcache1EnforceMaxPage(pGroup);
40574 pGroup->nMaxPage = savedMaxPage;
40575 pcache1LeaveMutex(pGroup);
40585 pcache1EnterMutex(pCache->pGroup);
40587 pcache1LeaveMutex(pCache->pGroup);
40606 PGroup *pGroup = pCache->pGroup;
40612 assert( pGroup->mxPinned == pGroup->nMaxPage + 10 - pGroup->nMinPage );
40615 nPinned>=pGroup->mxPinned
40626 if( pCache->bPurgeable && pGroup->pLruTail && (
40628 || pGroup->nCurrentPage>=pGroup->nMaxPage
40632 pPage = pGroup->pLruTail;
40649 pGroup->nCurrentPage -= (pOther->bPurgeable - pCache->bPurgeable);
40748 pcache1EnterMutex(pCache->pGroup);
40762 pcache1LeaveMutex(pCache->pGroup);
40779 PGroup *pGroup = pCache->pGroup;
40782 pcache1EnterMutex(pGroup);
40788 assert( pGroup->pLruHead!=pPage && pGroup->pLruTail!=pPage );
40791 if( reuseUnlikely || pGroup->nCurrentPage>pGroup->nMaxPage ){
40796 if( pGroup->pLruHead ){
40797 pGroup->pLruHead->pLruPrev = pPage;
40798 pPage->pLruNext = pGroup->pLruHead;
40799 pGroup->pLruHead = pPage;
40801 pGroup->pLruTail = pPage;
40802 pGroup->pLruHead = pPage;
40808 pcache1LeaveMutex(pCache->pGroup);
40827 pcache1EnterMutex(pCache->pGroup);
40844 pcache1LeaveMutex(pCache->pGroup);
40856 pcache1EnterMutex(pCache->pGroup);
40861 pcache1LeaveMutex(pCache->pGroup);
40871 PGroup *pGroup = pCache->pGroup;
40873 pcache1EnterMutex(pGroup);
40875 assert( pGroup->nMaxPage >= pCache->nMax );
40876 pGroup->nMaxPage -= pCache->nMax;
40877 assert( pGroup->nMinPage >= pCache->nMin );
40878 pGroup->nMinPage -= pCache->nMin;
40879 pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
40880 pcache1EnforceMaxPage(pGroup);
40881 pcache1LeaveMutex(pGroup);