- Timestamp:
- May 6, 2008 1:25:07 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMHandler.cpp
r8155 r8625 275 275 */ 276 276 /** @todo rename this to PGMR3HandlerVirtualRegisterEx. */ 277 /** @todo create a template for virtual handlers (see async i/o), we're wasting space 277 /** @todo create a template for virtual handlers (see async i/o), we're wasting space 278 278 * duplicating the function pointers now. (Or we will once we add the missing callbacks.) */ 279 279 PGMDECL(int) PGMHandlerVirtualRegisterEx(PVM pVM, PGMVIRTHANDLERTYPE enmType, RTGCPTR GCPtr, RTGCPTR GCPtrLast, … … 356 356 * the same range this makes everything much simpler and faster. 357 357 */ 358 AVLROGCPTRTREE *pRoot = enmType != PGMVIRTHANDLERTYPE_HYPERVISOR 358 AVLROGCPTRTREE *pRoot = enmType != PGMVIRTHANDLERTYPE_HYPERVISOR 359 359 ? &pVM->pgm.s.CTXSUFF(pTrees)->VirtHandlers 360 360 : &pVM->pgm.s.CTXSUFF(pTrees)->HyperVirtHandlers; … … 363 363 { 364 364 PPGMVIRTHANDLER pCur = (PPGMVIRTHANDLER)RTAvlroGCPtrGetBestFit(pRoot, pNew->Core.Key, true); 365 if ( !pCur 366 || GCPtr > pCur->GCPtrLast 365 if ( !pCur 366 || GCPtr > pCur->GCPtrLast 367 367 || GCPtrLast < pCur->GCPtr) 368 368 pCur = (PPGMVIRTHANDLER)RTAvlroGCPtrGetBestFit(pRoot, pNew->Core.Key, false); 369 if ( pCur 370 && GCPtr <= pCur->GCPtrLast 369 if ( pCur 370 && GCPtr <= pCur->GCPtrLast 371 371 && GCPtrLast >= pCur->GCPtr) 372 372 { … … 488 488 489 489 pgmUnlock(pVM); 490 490 491 491 STAM_DEREG(pVM, &pCur->Stat); 492 492 MMHyperFree(pVM, pCur);
Note:
See TracChangeset
for help on using the changeset viewer.