Lines Matching defs:pPool
45 static void * mmR3PagePoolAlloc(PMMPAGEPOOL pPool);
46 static void mmR3PagePoolFree(PMMPAGEPOOL pPool, void *pv);
163 * @param pPool Pointer to the page pool.
166 DECLINLINE(void *) mmR3PagePoolAlloc(PMMPAGEPOOL pPool)
168 VM_ASSERT_EMT(pPool->pVM);
169 STAM_COUNTER_INC(&pPool->cAllocCalls);
174 if (pPool->pHeadFree)
176 PMMPAGESUBPOOL pSub = pPool->pHeadFree;
179 pPool->pHeadFree = pSub->pNextFree;
181 pPool->cFreePages--;
214 STAM_COUNTER_INC(&pPool->cErrors);
221 STAM_COUNTER_INC(&pPool->cErrors);
223 pPool->cFreePages++;
231 unsigned cPages = !pPool->fLow ? 128 : 32;
233 int rc = MMHyperAlloc(pPool->pVM,
245 if (!pPool->fLow)
253 rc = VMSetError(pPool->pVM, rc, RT_SRC_POS,
270 pSub->pNextFree = pPool->pHeadFree;
271 pPool->pHeadFree= pSub;
273 pSub->pNext = pPool->pHead;
274 pPool->pHead = pSub;
276 pPool->cSubPools++;
277 pPool->cPages += cPages;
279 pPool->cFreePages += cPages - 1;
302 RTAvlHCPhysInsert(&pPool->pLookupPhys, &paLookupPhys[i].Core);
311 RTAvlPVInsert(&pPool->pLookupVirt, &pLookupVirt->Core);
317 MMHyperFree(pPool->pVM, pSub);
318 STAM_COUNTER_INC(&pPool->cErrors);
319 if (pPool->fLow)
320 VMSetError(pPool->pVM, rc, RT_SRC_POS,
322 pPool->cPages);
324 pPool->fLow ? " (<4GB)" : "", rc, pPool->cPages));
332 * @param pPool Pointer to the page pool.
337 DECLINLINE(void) mmR3PagePoolFree(PMMPAGEPOOL pPool, void *pv)
339 VM_ASSERT_EMT(pPool->pVM);
340 STAM_COUNTER_INC(&pPool->cFreeCalls);
345 PMMPPLOOKUPHCPTR pLookup = (PMMPPLOOKUPHCPTR)RTAvlPVGetBestFit(&pPool->pLookupVirt, pv, false);
350 STAM_COUNTER_INC(&pPool->cErrors);
372 pPool->cFreePages++;
376 pSubPool->pNextFree = pPool->pHeadFree;
377 pPool->pHeadFree = pSubPool;