Lines Matching defs:iPage
240 * @param iPage The page to start allocating at.
245 DECLINLINE(int) rtHeapPageAllocFromBlockSuccess(PRTHEAPPAGEBLOCK pBlock, uint32_t iPage, size_t cPages, bool fZero, void **ppv)
249 ASMBitSet(&pBlock->bmFirst[0], iPage);
256 void *pv = (uint8_t *)pBlock->Core.Key + (iPage << PAGE_SHIFT);
300 int iPage = ASMBitFirstClear(&pBlock->bmAlloc[0], RTMEMPAGEPOSIX_BLOCK_PAGE_COUNT);
301 Assert(iPage >= 0);
306 ASMBitSet(&pBlock->bmAlloc[0], iPage);
307 return rtHeapPageAllocFromBlockSuccess(pBlock, iPage, cPages, fZero, ppv);
310 while ( iPage >= 0
311 && (unsigned)iPage <= RTMEMPAGEPOSIX_BLOCK_PAGE_COUNT - cPages)
313 if (rtHeapPageIsPageRangeFree(pBlock, iPage + 1, cPages - 1))
315 ASMBitSetRange(&pBlock->bmAlloc[0], iPage, iPage + cPages);
316 return rtHeapPageAllocFromBlockSuccess(pBlock, iPage, cPages, fZero, ppv);
320 iPage = ASMBitNextSet(&pBlock->bmAlloc[0], RTMEMPAGEPOSIX_BLOCK_PAGE_COUNT, iPage);
321 if (iPage < 0 || iPage >= RTMEMPAGEPOSIX_BLOCK_PAGE_COUNT - 1)
323 iPage = ASMBitNextClear(&pBlock->bmAlloc[0], RTMEMPAGEPOSIX_BLOCK_PAGE_COUNT, iPage);
536 uint32_t const iPage = (uint32_t)(((uintptr_t)pv - (uintptr_t)pBlock->Core.Key) >> PAGE_SHIFT);
538 bool fOk = iPage + cPages <= RTMEMPAGEPOSIX_BLOCK_PAGE_COUNT;
540 fOk = fOk && ASMBitTest(&pBlock->bmFirst[0], iPage);
542 fOk = fOk && ( iPage + cPages == RTMEMPAGEPOSIX_BLOCK_PAGE_COUNT
543 || ASMBitTest(&pBlock->bmFirst[0], iPage + cPages)
544 || !ASMBitTest(&pBlock->bmAlloc[0], iPage + cPages));
546 uint32_t const iLastPage = iPage + cPages - 1;
547 for (uint32_t i = iPage + 1; i < iLastPage && fOk; i++)
555 ASMBitClearRange(&pBlock->bmAlloc[0], iPage, iPage + cPages);
556 ASMBitClear(&pBlock->bmFirst[0], iPage);